mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
drm/qxl: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
The drm_gem_object_unreference_unlocked() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/913198fa-2aa4-4804-8616-dd495428c0a5@users.sourceforge.net
This commit is contained in:
parent
6c9262aca6
commit
dc3583c86a
@ -468,8 +468,7 @@ void qxl_user_framebuffer_destroy(struct drm_framebuffer *fb)
|
||||
{
|
||||
struct qxl_framebuffer *qxl_fb = to_qxl_framebuffer(fb);
|
||||
|
||||
if (qxl_fb->obj)
|
||||
drm_gem_object_unreference_unlocked(qxl_fb->obj);
|
||||
drm_gem_object_unreference_unlocked(qxl_fb->obj);
|
||||
drm_framebuffer_cleanup(fb);
|
||||
kfree(qxl_fb);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user