mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
drm/nouveau/hwmon: fix the initialization condition
Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
11573aa788
commit
a5f5af8698
@ -706,8 +706,7 @@ nouveau_hwmon_init(struct drm_device *dev)
|
||||
struct device *hwmon_dev;
|
||||
int ret = 0;
|
||||
|
||||
if (!therm || !therm->temp_get || !therm->attr_get ||
|
||||
!therm->attr_set || therm->temp_get(therm) < 0)
|
||||
if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
|
||||
return -ENODEV;
|
||||
|
||||
hwmon_dev = hwmon_device_register(&dev->pdev->dev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user