diff options
author | Ivan Bornyakov <i.bornyakov@metrotek.ru> | 2023-03-06 16:25:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-30 12:51:42 +0200 |
commit | a963bf055a6480d2b7b5312628cf52279ecd80ad (patch) | |
tree | 5261c3e73595c5cf65baa32e12b1014df698871d /lib/net_utils.c | |
parent | b4f664ffd8f78c05a1fd542a28bc5a11e994c014 (diff) |
bus: imx-weim: fix branch condition evaluates to a garbage value
commit 1adab2922c58e7ff4fa9f0b43695079402cce876 upstream.
If bus type is other than imx50_weim_devtype and have no child devices,
variable 'ret' in function weim_parse_dt() will not be initialized, but
will be used as branch condition and return value. Fix this by
initializing 'ret' with 0.
This was discovered with help of clang-analyzer, but the situation is
quite possible in real life.
Fixes: 52c47b63412b ("bus: imx-weim: improve error handling upon child probe-failure")
Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Cc: stable@vger.kernel.org
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions