提交 d520dd1f 编写于 作者: M Markus Elfring 提交者: Matt Fleming

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: NMarkus 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: NMatt Fleming <matt@codeblueprint.co.uk>
上级 ac0e94b6
...@@ -910,8 +910,7 @@ static __init int gsmi_init(void) ...@@ -910,8 +910,7 @@ static __init int gsmi_init(void)
gsmi_buf_free(gsmi_dev.param_buf); gsmi_buf_free(gsmi_dev.param_buf);
gsmi_buf_free(gsmi_dev.data_buf); gsmi_buf_free(gsmi_dev.data_buf);
gsmi_buf_free(gsmi_dev.name_buf); gsmi_buf_free(gsmi_dev.name_buf);
if (gsmi_dev.dma_pool) dma_pool_destroy(gsmi_dev.dma_pool);
dma_pool_destroy(gsmi_dev.dma_pool);
platform_device_unregister(gsmi_dev.pdev); platform_device_unregister(gsmi_dev.pdev);
pr_info("gsmi: failed to load: %d\n", ret); pr_info("gsmi: failed to load: %d\n", ret);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册