提交 74baea42 编写于 作者: D Dan Carpenter 提交者: Alex Deucher

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: NChristian König <christian.koenig@amd.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 620fd73e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册