Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754661AbbFWLwH (ORCPT ); Tue, 23 Jun 2015 07:52:07 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:41324 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754559AbbFWLv5 (ORCPT ); Tue, 23 Jun 2015 07:51:57 -0400 X-AuditID: cbfee68e-f79c56d000006efb-76-5589485b3d98 From: Maninder Singh To: ccaulfie@redhat.com, teigland@redhat.com, cluster-devel@redhat.com, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] dlm: Remove NULL check before kfree Date: Tue, 23 Jun 2015 17:20:22 +0530 Message-id: <1435060222-10654-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrILMWRmVeSWpSXmKPExsWyRsSkTjfaozPUYNZMNYvHfxtZLU6ufsxm cXnXHDaLw/PbWCzuvdnKZLGgYRerA5vH+31X2Tz6tqxi9Pi8SS6AOYrLJiU1J7MstUjfLoEr 43nnY6aCA2wVr35sZWpg3MjaxcjJISFgIvH+91o2CFtM4sK99UA2F4eQwFJGie9zVzDDFN0+ 38cEkZjOKDH10hlGCOcno8S91+cZQarYBPQkVu3aw9LFyMEhIpAmsXxFLYjJLOAkMf2rHkiF sICFRP/Ea2CLWQRUJT5uec4MUsIr4C5xcRY3iCkhoCAxZ5INyHAJgddsEv0njrBDlAtIfJt8 iAWiRlZi0wGoyyQlDq64wTKBUXABI8MqRtHUguSC4qT0IiO94sTc4tK8dL3k/NxNjMCQPP3v Wd8OxpsHrA8xCnAwKvHwTnDtDBViTSwrrsw9xGgKtGEis5Rocj4w8PNK4g2NzYwsTE1MjY3M Lc2UxHkTpH4GCwmkJ5akZqemFqQWxReV5qQWH2Jk4uCUamCcfFpr3/PvRqm9wqZxHG9lRUPX KeSzT11Qr/Vq8dqvOy0qTtuud5EOfjZJO1ym5+pvmaC5M/1OT6+t4Xsk/fjpjbB9DM4Jix/z Fx/9P83AsPnai8+OGh8U2QJ9vly4fvl952zV8lS2tZe1kv8qpjHOfcMjKsqr1ZN2eErelpMH 3rTLrvu66+4UJZbijERDLeai4kQAkTnXsEQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsVy+t9jQd1oj85Qgz3/ZCwe/21ktTi5+jGb xeVdc9gsDs9vY7G492Yrk8WChl2sDmwe7/ddZfPo27KK0ePzJrkA5qgGRpuM1MSU1CKF1Lzk /JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoMVKCmWJOaVAoYDE4mIlfTtM E0JD3HQtYBojdH1DguB6jAzQQMIaxoznnY+ZCg6wVbz6sZWpgXEjaxcjJ4eEgInE7fN9TBC2 mMSFe+vZuhi5OIQEpjNKTL10hhHC+ckoce/1eUaQKjYBPYlVu/awdDFycIgIpEksX1ELYjIL OElM/6oHUiEsYCHRP/Ea2HwWAVWJj1ueM4OU8Aq4S1ycxQ1iSggoSMyZZDOBkXsBI8MqRtHU guSC4qT0XCO94sTc4tK8dL3k/NxNjOCAfya9g3FVg8UhRgEORiUe3gcOnaFCrIllxZW5hxgl OJiVRHh/g4R4UxIrq1KL8uOLSnNSiw8xmgLtnsgsJZqcD4zGvJJ4Q2MTc1NjU0sTCxMzSyVx 3pP5PqFCAumJJanZqakFqUUwfUwcnFINjGsKo8Mqbl505JvwZl8uS11iaNypU+1v+CfNC2gX 5b+wTL6tdfppy8wO89/zKz8t6D3f/018h/q/ww+6P7hO+e6md9pmwYyLk/p/v1yRf/t46pbv 141TbPXaZjVw8yVK31a/L5qbb103wf3np01eYemXAjLKz863+1MndO+/m/4jo/91akuarimx FGckGmoxFxUnAgB+m/c8jgIAAA== 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: 1048 Lines: 34 No need of NULL check before kfree, removing the same. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- fs/dlm/lockspace.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index f3e7278..41c53b3 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -673,10 +673,8 @@ static int new_lockspace(const char *name, const char *cluster, kfree(ls->ls_recover_buf); out_lkbidr: idr_destroy(&ls->ls_lkbidr); - for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) { - if (ls->ls_remove_names[i]) - kfree(ls->ls_remove_names[i]); - } + for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) + kfree(ls->ls_remove_names[i]); out_rsbtbl: vfree(ls->ls_rsbtbl); out_lsfree: -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/