Skip to content

Commit d520dd1

Browse files
elfringmfleming
authored andcommitted
firmware-gsmi: Delete an unnecessary check before the function call "dma_pool_destroy"
The dma_pool_destroy() 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> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Julia Lawall <julia.lawall@lip6.fr> Cc: Mike Waychison <mikew@google.com> Cc: Michel Lespinasse <walken@google.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
1 parent ac0e94b commit d520dd1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/firmware/google/gsmi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,7 @@ static __init int gsmi_init(void)
910910
gsmi_buf_free(gsmi_dev.param_buf);
911911
gsmi_buf_free(gsmi_dev.data_buf);
912912
gsmi_buf_free(gsmi_dev.name_buf);
913-
if (gsmi_dev.dma_pool)
914-
dma_pool_destroy(gsmi_dev.dma_pool);
913+
dma_pool_destroy(gsmi_dev.dma_pool);
915914
platform_device_unregister(gsmi_dev.pdev);
916915
pr_info("gsmi: failed to load: %d\n", ret);
917916
return ret;

0 commit comments

Comments
 (0)