* [PATCH] rsxx: remove redundant NULL check
@ 2021-01-21 9:43 Yang Li
2021-01-26 20:15 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-01-21 9:43 UTC (permalink / raw)
To: josh.h.morris; +Cc: pjk1939, axboe, linux-block, linux-kernel, Yang Li
Fix below warnings reported by coccicheck:
./drivers/block/rsxx/dma.c:948:3-8: WARNING: NULL check
before some freeing functions is not needed.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
---
drivers/block/rsxx/dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/rsxx/dma.c b/drivers/block/rsxx/dma.c
index 1914f54..0574f44 100644
--- a/drivers/block/rsxx/dma.c
+++ b/drivers/block/rsxx/dma.c
@@ -944,8 +944,7 @@ int rsxx_dma_setup(struct rsxx_cardinfo *card)
ctrl->done_wq = NULL;
}
- if (ctrl->trackers)
- vfree(ctrl->trackers);
+ vfree(ctrl->trackers);
if (ctrl->status.buf)
dma_free_coherent(&card->dev->dev, STATUS_BUFFER_SIZE8,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rsxx: remove redundant NULL check
2021-01-21 9:43 [PATCH] rsxx: remove redundant NULL check Yang Li
@ 2021-01-26 20:15 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-01-26 20:15 UTC (permalink / raw)
To: Yang Li, josh.h.morris; +Cc: pjk1939, linux-block, linux-kernel
On 1/21/21 2:43 AM, Yang Li wrote:
> Fix below warnings reported by coccicheck:
> ./drivers/block/rsxx/dma.c:948:3-8: WARNING: NULL check
> before some freeing functions is not needed.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-27 3:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 9:43 [PATCH] rsxx: remove redundant NULL check Yang Li
2021-01-26 20:15 ` Jens Axboe
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).