LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dma-buf: Fix ifnullfree.cocci warnings
@ 2017-11-22 15:22 Vasyl Gomonovych
2017-11-23 10:45 ` Sumit Semwal
0 siblings, 1 reply; 2+ messages in thread
From: Vasyl Gomonovych @ 2017-11-22 15:22 UTC (permalink / raw)
To: sumit.semwal, linux-media, dri-devel, linaro-mm-sig
Cc: linux-kernel, gomonovych
NULL check before some freeing functions is not needed.
drivers/dma-buf/dma-buf.c:1183:2-26: WARNING: NULL check before freeing debugfs_remove_recursive
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
drivers/dma-buf/dma-buf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 4a038dcf5361..048827b06c03 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1179,8 +1179,7 @@ static int dma_buf_init_debugfs(void)
static void dma_buf_uninit_debugfs(void)
{
- if (dma_buf_debugfs_dir)
- debugfs_remove_recursive(dma_buf_debugfs_dir);
+ debugfs_remove_recursive(dma_buf_debugfs_dir);
}
#else
static inline int dma_buf_init_debugfs(void)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dma-buf: Fix ifnullfree.cocci warnings
2017-11-22 15:22 [PATCH] dma-buf: Fix ifnullfree.cocci warnings Vasyl Gomonovych
@ 2017-11-23 10:45 ` Sumit Semwal
0 siblings, 0 replies; 2+ messages in thread
From: Sumit Semwal @ 2017-11-23 10:45 UTC (permalink / raw)
To: Vasyl Gomonovych; +Cc: linux-media, DRI mailing list, Linaro MM SIG, LKML
Hello Vasyl,
On 22 November 2017 at 20:52, Vasyl Gomonovych <gomonovych@gmail.com> wrote:
> NULL check before some freeing functions is not needed.
> drivers/dma-buf/dma-buf.c:1183:2-26: WARNING: NULL check before freeing debugfs_remove_recursive
> Generated by: scripts/coccinelle/free/ifnullfree.cocci
Thank you for your patch; applied to drm-misc-next.
>
> Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
> ---
> drivers/dma-buf/dma-buf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 4a038dcf5361..048827b06c03 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -1179,8 +1179,7 @@ static int dma_buf_init_debugfs(void)
>
> static void dma_buf_uninit_debugfs(void)
> {
> - if (dma_buf_debugfs_dir)
> - debugfs_remove_recursive(dma_buf_debugfs_dir);
> + debugfs_remove_recursive(dma_buf_debugfs_dir);
> }
> #else
> static inline int dma_buf_init_debugfs(void)
> --
> 1.9.1
>
--
Thanks and regards,
Sumit Semwal
Linaro Mobile Group - Kernel Team Lead
Linaro.org │ Open source software for ARM SoCs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-23 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 15:22 [PATCH] dma-buf: Fix ifnullfree.cocci warnings Vasyl Gomonovych
2017-11-23 10:45 ` Sumit Semwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).