Skip to contentSkip to conversation

rsxx: remove redundant NULL check

PATCH Applied Yang Li 2 participants 2 messages Jan 21, 2021 – Jan 26, 2021 Block layer

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 rsxx: remove redundant NULL check

Fix below warnings reported by coccicheck:
./drivers/block/rsxx/dma.c:948:3-8: WARNING: NULL check before some freeing functions is not needed.

---
 drivers/block/rsxx/dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/rsxx/dma.c +1 -2
index 1914f54..0574f44 100644
@@ -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,
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw
Quoted 3 lines · 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.

Applied, thanks.

Signature · 1 line
Jens Axboe