Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3ae2550 authored by Markus Elfring's avatar Markus Elfring Committed by Daniel Vetter
Browse files

drm/bochs: 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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1e3a8c0d-e737-f092-727e-af7e3810b8dc@users.sourceforge.net
parent 40777984
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -474,7 +474,7 @@ int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
static void bochs_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
	struct bochs_framebuffer *bochs_fb = to_bochs_framebuffer(fb);
	if (bochs_fb->obj)

	drm_gem_object_unreference_unlocked(bochs_fb->obj);
	drm_framebuffer_cleanup(fb);
	kfree(fb);