hwmon: Fix possible NULL pointer
The recent addition of the label attribute added some code that read the
"label" device property, without checking first that "dev" was non-NULL.
Fix this issue by first checking that "dev" is non-NULL.
Fixes: ccd98cba6a18 ("hwmon: Add "label" attribute")
Signed-off-by:
Paul Cercueil <paul@crapouillou.net>
Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
Loading
Please sign in to comment