scsi: elx: efct: Delete an unnecessary check before kfree() in efct_hw_rx_post()
PATCH 1/1 scsi: elx: efct: Delete an unnecessary check before kfree() in efct_hw_rx_post()
From: Markus Elfring <[email protected]>
Date: Tue, 10 Jun 2025 13:03:50 +0200
It can be known that the function “kfree” performs a null pointer check for its input parameter.
It is therefore not needed to repeat such a check before its call.
Thus remove a redundant pointer check.
The source code was transformed by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/scsi/elx/efct/efct_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/elx/efct/efct_hw.c +1 -1
@@ -1314,7 +1314,7 @@ efct_hw_rx_post(struct efct_hw *hw)break ; } -if (rc && hw->seq_pool) +if (rc)kfree (hw->seq_pool);return rc;
Signature · 1 line
2.49.0