mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/rockchip: drv: Fix drm_atomic_helper_duplicate_state() error check
Use IS_ERR() instead of checking for a NULL pointer when calling for drm_atomic_helper_duplicate_state() failures. drm_atomic_helper_duplicate_state() return an ERR_PTR()-encoded error code on failure. Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: I95388698239a7e1bd2bfbedd2bd921bbf52372f0
This commit is contained in:
@@ -1167,7 +1167,7 @@ static void rockchip_drm_set_property_default(struct drm_device *drm)
|
||||
drm_modeset_lock_all(drm);
|
||||
|
||||
state = drm_atomic_helper_duplicate_state(drm, conf->acquire_ctx);
|
||||
if (!state) {
|
||||
if (IS_ERR(state)) {
|
||||
DRM_ERROR("failed to alloc atomic state\n");
|
||||
goto err_unlock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user