Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752780AbbFWF7h (ORCPT ); Tue, 23 Jun 2015 01:59:37 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:34201 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbbFWF7e (ORCPT ); Tue, 23 Jun 2015 01:59:34 -0400 X-AuditID: cbfee68e-f79c56d000006efb-7a-5588f5c457b5 From: Maninder Singh To: clm@fb.com, jbacik@fb.com, dsterba@suse.cz, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] Btrfs: Remove redundant NULL check before kfree Date: Tue, 23 Jun 2015 11:28:00 +0530 Message-id: <1435039080-2952-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGLMWRmVeSWpSXmKPExsWyRsSkVvfI145Qg92P+Cwm9c9gt1j8+zuL xd+dC1ksLj1ewW5xedccNovD89tYLO692crkwO4xsfkdu0ffllWMHmcWHGH3+LxJLoAlissm JTUnsyy1SN8ugStj/nm1gm1sFZ3nWtkaGGeydjFyckgImEg8ePcKyhaTuHBvPVsXIxeHkMBS RonVlxaydDFygBVdPJYNEV/EKPHz4lJGkAYhgZ+MEic+pILYbAJ6Eqt27WEBsUUEsiXmbj3L BNLLLOAkMf2rHkhYWMBForu5GyzMIqAq0fedt4uRnYNXwE2ijwtij4LEnEk2ELd8Z5PYcVoV xGYREJD4NvkQ1CmyEpsOMEOUSEocXHGDZQKj4AJGhlWMoqkFyQXFSelFRnrFibnFpXnpesn5 uZsYgcF5+t+zvh2MNw9YH2IU4GBU4uG98a4jVIg1say4MvcQoynQhonMUqLJ+cAYyCuJNzQ2 M7IwNTE1NjK3NFMS502Q+hksJJCeWJKanZpakFoUX1Sak1p8iJGJg1OqgdEn50JgucOxLVNs eDgt5+iFsZaFn7h/7/A8zymTbf1dG9u/TbntdGKBY1l/wzd9tbWLossnq53YVnJpTptiQWBf wK2X286dSNAMjf9qsPjVtuoDtq12IZ2BB6ZGTil4ue3mNZkdj074vl9y0vNe/v4+oZeSmQvO fb1n6hS3no/Xp5P1cwVPl4sSS3FGoqEWc1FxIgDYge4GSQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkkeLIzCtJLcpLzFFi42I5/e+xgO6Rrx2hBt/Xs1tM6p/BbrH493cW i787F7JYXHq8gt3i8q45bBaH57exWNx7s5XJgd1jYvM7do++LasYPc4sOMLu8XmTXABLVAOj TUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7QCUoKZYk5 pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwhrGjPnn1Qq2sVV0nmtla2CcydrFyMEh IWAicfFYdhcjJ5ApJnHh3nq2LkYuDiGBRYwSPy8uZQRJCAn8ZJQ48SEVxGYT0JNYtWsPC4gt IpAtMXfrWSaQOcwCThLTv+qBhIUFXCS6m7vBwiwCqhJ933m7GNk5eAXcJPq4IHYqSMyZZDOB kXsBI8MqRtHUguSC4qT0XCO94sTc4tK8dL3k/NxNjODgfya9g3FVg8UhRgEORiUe3o7PHaFC rIllxZW5hxglOJiVRHjX3gQK8aYkVlalFuXHF5XmpBYfYjQF2jyRWUo0OR8YmXkl8YbGJuam xqaWJhYmZpZK4rwn831ChQTSE0tSs1NTC1KLYPqYODilGhi3XVhXfOPLo+zX050fL2icslJJ ++dPhj5TZccbNaxlqhssuRi1yjniZnsdnCKhz1lnfmhWzBlW76s2O1zjLN48ilq5eIWUtcru QrNjYr8591kERBau7pFf3M75VpeV8QPHFgv2taGLZjEeDzpTavLR/oz/zwetp2sO9ziKsOh/ LORrbVN5pavEUpyRaKjFXFScCABbSNoXlAIAAA== 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: 913 Lines: 39 There is no need of NULL check before kfree, removing the same Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- fs/btrfs/free-space-cache.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 9dbe5b5..88f1e16 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -2101,8 +2101,7 @@ new_bitmap: out: if (info) { - if (info->bitmap) - kfree(info->bitmap); + kfree(info->bitmap); kmem_cache_free(btrfs_free_space_cachep, info); } @@ -3561,8 +3560,7 @@ again: if (info) kmem_cache_free(btrfs_free_space_cachep, info); - if (map) - kfree(map); + kfree(map); return 0; } -- 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/