Commit 2e9ef0fc authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen
Browse files

scsi: ipr: Remove NULL check before freeing function

Fix the following coccicheck warning:

drivers/scsi/ipr.c:9533:2-18: WARNING: NULL check before some freeing
functions is not needed.

Link: https://lore.kernel.org/r/20200418095903.35118-1-yanaijie@huawei.com


Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f166021c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -9529,7 +9529,6 @@ static void ipr_free_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
		}
	}

	if (ioa_cfg->ipr_cmd_pool)
	dma_pool_destroy(ioa_cfg->ipr_cmd_pool);

	kfree(ioa_cfg->ipr_cmnd_list);