From ee4c5fcd7f1e250f4122c1022ec5eb1241d29bda Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 7 Nov 2015 00:10:01 +0000 Subject: [PATCH] scst_lib: Avoid that checkpatch reports that kfree(NULL) is safe git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6620 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index a284f2e97..03ae0060f 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5924,8 +5924,7 @@ static void scst_ws_finished(struct scst_write_same_priv *wsp) else if (wsp->ws_sg_tails && wsp->ws_sg_tails[0].sg_cnt != 0 && sg_page(&wsp->ws_sg_tails[0].sg[0]) != sg_page(ws_cmd->sg)) __free_page(sg_page(&wsp->ws_sg_tails[0].sg[0])); - if (wsp->ws_sg_full) - kfree(wsp->ws_sg_full); + kfree(wsp->ws_sg_full); if (wsp->ws_sg_tails) { for (i = 0; wsp->ws_descriptors[i].sdd_blocks != 0; i++) if (wsp->ws_sg_tails[i].sg_cnt != 0)