drm/amd/display: checking for NULL instead of IS_ERR()
backlight_device_register() never returns NULL, it returns error pointers on error so the check here is wrong. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
620fd73edf
commit
74baea4275
|
@ -1296,7 +1296,7 @@ amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm)
|
|||
&amdgpu_dm_backlight_ops,
|
||||
&props);
|
||||
|
||||
if (NULL == dm->backlight_dev)
|
||||
if (IS_ERR(dm->backlight_dev))
|
||||
DRM_ERROR("DM: Backlight registration failed!\n");
|
||||
else
|
||||
DRM_DEBUG_DRIVER("DM: Registered Backlight device: %s\n", bl_name);
|
||||
|
|
Loading…
Reference in New Issue