Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752183AbbFXKFq (ORCPT ); Wed, 24 Jun 2015 06:05:46 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:39362 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbbFXKFj (ORCPT ); Wed, 24 Jun 2015 06:05:39 -0400 X-AuditID: cbfee68e-f79c56d000006efb-2a-558a80f07578 From: Maninder Singh To: snitzer@redhat.com, axboe@fb.com, akpm@linux-foundation.org, benoit.taine@lip6.fr, bhelgaas@google.com, joe@perches.com, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] block: remove check around kfree Date: Wed, 24 Jun 2015 15:33:38 +0530 Message-id: <1435140218-25852-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRmVeSWpSXmKPExsWyRsSkWvdDQ1eowcQbmhZz1q9hs/i/5xib xafv7xgtljRlWMy+/5jF4vKuOWwWh+e3sVjce7OVyaJt41dGB06Pic3v2D0WbCr1ODHjN4vH 3i1ZHl9WXWP2eL/vKptH35ZVjB6fN8kFcERx2aSk5mSWpRbp2yVwZTxomMtWMIu14uuW3AbG 5SxdjJwcEgImEpeap7FC2GISF+6tZwOxhQSWMkrc69WDqZncsIS9i5ELKD6dUeJu3xMmCOcn o8TiSaeZQarYBPQkVu3awwKSEBGYyyhxZeYOoBYODmYBJ4npX/VATGEBU4llbVwg5SwCqhL9 d7Ywgti8Au4STb9bWEFKJAQUJOZMsgGZIiGwiF3i5tuzTBD1AhLfJh9igaiRldh0gBniNkmJ gytusExgFFzAyLCKUTS1ILmgOCm9yEivODG3uDQvXS85P3cTIzC4T/971reD8eYB60OMAhyM Sjy8HrVdoUKsiWXFlbmHGE2BNkxklhJNzgfGUF5JvKGxmZGFqYmpsZG5pZmSOG+C1M9gIYH0 xJ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qZGxd3bZhX/UK59ncjqnaBnu4o/3EhciaU4I9FQi7moOBEAPNfh mbQCAAA= 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: 885 Lines: 31 kfree Checks for NULL poitner itself, so no need of explicit NULL check Signed-off-by: Maninder Singh Reviewed-by: Rohit Thapliyal --- drivers/block/skd_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 1e46eb2..c4b0259 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -3998,8 +3998,7 @@ static int skd_acquire_msix(struct skd_device *skdev) return 0; msix_out: - if (entries) - kfree(entries); + kfree(entries); skd_release_msix(skdev); return rc; } -- 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/