Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753526AbbFWDoT (ORCPT ); Mon, 22 Jun 2015 23:44:19 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:38277 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287AbbFWDoM (ORCPT ); Mon, 22 Jun 2015 23:44:12 -0400 X-AuditID: cbfee691-f79ca6d00000456a-81-5588d60a717d From: Maninder Singh To: JBottomley@odin.com, hare@suse.de, hch@lst.de, michaelc@cs.wisc.edu, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] scsi: remove redundant NULL check before kfree Date: Tue, 23 Jun 2015 09:12:30 +0530 Message-id: <1435030950-35999-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRmVeSWpSXmKPExsWyRsSkVpfrWkeowbPNghZ7Fk1isli5+iiT xf/1t1ksLu+aw2bRfX0Hm8Xh+W0sFsuP/2OyWPGmm9Hi3putTA6cHld/rWL22H2zgc3j8I8f zB4fn95i8ejbsorRY/Ppao/Pm+QC2KO4bFJSczLLUov07RK4Ml6v+8Ve8J6tomvlTrYGxg+s XYycHBICJhJ77hxlgbDFJC7cW8/WxcjFISSwlFGi6ddXFpiiplcgDSCJRYwSyw8sYYdwfjJK LHs9jw2kik1AT2LVrj1gHSICCxkl+h9rdjFycDALOElM/6oHYgoLOEtsOFMOUsEioCrRfP4C M0iYV8BdouNmDIgpIaAgMWeSDchwCYHp7BJ7f31jhigXkPg2+RALRI2sxKYDzBCXSUocXHGD ZQKj4AJGhlWMoqkFyQXFSelFpnrFibnFpXnpesn5uZsYgWF9+t+ziTsY7x+wPsQowMGoxMMr cLUjVIg1say4MvcQoynQhonMUqLJ+cDoySuJNzQ2M7IwNTE1NjK3NFMS59WR/h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7kMe6uSS+bMk9gbt152wVyN83rlFiKMxINtZiLihMBQ+eV8LACAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 980 Lines: 29 There is no need of NULL check before kfree, So removing the same. Signed-off-by: Maninder Singh Reviewed-by: Rohit Thapliyal --- drivers/scsi/aic94xx/aic94xx_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 4b135cc..a449fde 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -589,8 +589,7 @@ static void asd_destroy_ha_caches(struct asd_ha_struct *asd_ha) if (asd_ha->hw_prof.scb_ext) asd_free_coherent(asd_ha, asd_ha->hw_prof.scb_ext); - if (asd_ha->hw_prof.ddb_bitmap) - kfree(asd_ha->hw_prof.ddb_bitmap); + kfree(asd_ha->hw_prof.ddb_bitmap); asd_ha->hw_prof.ddb_bitmap = NULL; for (i = 0; i < ASD_MAX_PHYS; i++) { -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/