Re: [PATCH net-next v2] net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Grygorii Strashko <grygorii.strashko@xxxxxx>
Date: Tue, 15 May 2018 18:37:25 -0500

> This fixes klockworks warnings: Pointer 'dev' returned from call to
> function 'bus_find_device' at line 179 may be NULL and will be dereferenced
> at line 181.
> 
>     cpsw-phy-sel.c:179: 'dev' is assigned the return value from function 'bus_find_device'.
>     bus.c:342: 'bus_find_device' explicitly returns a NULL value.
>     cpsw-phy-sel.c:181: 'dev' is dereferenced by passing argument 1 to function 'dev_get_drvdata'.
>     device.h:1024: 'dev' is passed to function 'dev_get_drvdata'.
>     device.h:1026: 'dev' is explicitly dereferenced.
> 
> Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx>
> [nsekhar@xxxxxx: add an error message, fix return path]
> Signed-off-by: Sekhar Nori <nsekhar@xxxxxx>
> ---
> v2: use %pOF

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux