summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2024-10-07 13:51:32 +0200
committerZack Rusin <zack.rusin@broadcom.com>2024-10-10 23:01:45 -0400
commitf07fd958a49264eebc1db9c946eb5d2e91c470fd (patch)
tree43dd0786240871790ab2ed48ec111226699471f8 /drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
parent26498b8d54373d31a621d7dec95c4bd842563b3b (diff)
downloadlwn-f07fd958a49264eebc1db9c946eb5d2e91c470fd.tar.gz
lwn-f07fd958a49264eebc1db9c946eb5d2e91c470fd.zip
drm/vmwgfx: Remove unnecessary NULL checks before kvfree()
Since kvfree() already checks if its argument is NULL, an additional check before calling kvfree() is unnecessary and can be removed. Remove both and the following Coccinelle/coccicheck warnings reported by ifnullfree.cocci: WARNING: NULL check before some freeing functions is not needed WARNING: NULL check before some freeing functions is not needed Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241007115131.1811-3-thorsten.blum@linux.dev
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_blit.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_blit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c b/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
index 890a66a2361f..64bd7d74854e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
@@ -635,10 +635,8 @@ out:
kunmap_atomic(d.src_addr);
if (d.dst_addr)
kunmap_atomic(d.dst_addr);
- if (src_pages)
- kvfree(src_pages);
- if (dst_pages)
- kvfree(dst_pages);
+ kvfree(src_pages);
+ kvfree(dst_pages);
return ret;
}