From patchwork Tue Nov 20 09:13:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1772071 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7E66B3FC5A for ; Tue, 20 Nov 2012 09:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812Ab2KTJTa (ORCPT ); Tue, 20 Nov 2012 04:19:30 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:58140 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566Ab2KTJTa (ORCPT ); Tue, 20 Nov 2012 04:19:30 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so1160372dak.19 for ; Tue, 20 Nov 2012 01:19:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=beBWsjdRXhuMM2EU2mrFbtAOl8xil82kmK7kt/xOjUQ=; b=ChFRxTcZWp+UhvheCHR3ByU6oKvBBmei0ug6Giv0f54CPLVZM0VLAX2UgoBSVjGDFp 7fw8yy7S7jU3WqgiFSMPQ08WUqxdArgiqoEh6eIqFtjK1UnBYXcafmITD8z35DG+HjIA vPDc1PTH+EHqKwXLtJ+qSmnGqEs7LLvvSnl6EHN9jlzzhWrfU61qgTavL+xmKn43ylD/ P5ttL7P0X5CZK+5XSxlR9p3SuqJmvqUiS81w6zlmccYC4NJgjXBPQa8Rb5MYCA/LNrcI K8EDwdwincy+b8ryUJrZ+dugnNyqNes61BjxfMzKl6PODOFh7aHWA6I5H13oUMo3x26J GJOw== Received: by 10.66.87.163 with SMTP id az3mr6289576pab.62.1353403169945; Tue, 20 Nov 2012 01:19:29 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ix9sm7778744pbc.7.2012.11.20.01.19.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:19:29 -0800 (PST) From: Sachin Kamat To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/2] mmc: Remove redundant null check before kfree in bus.c Date: Tue, 20 Nov 2012 14:43:17 +0530 Message-Id: <1353402797-6785-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353402797-6785-1-git-send-email-sachin.kamat@linaro.org> References: <1353402797-6785-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlj3jgLB7EbYQdLY5Mzrf/Bo1cC9m+ykx1IXA1hSPamKYTwVGPpl9SAaAB5tVzGp87xq74H Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat --- drivers/mmc/core/bus.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 9b68933..420cb67 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -225,8 +225,7 @@ static void mmc_release_card(struct device *dev) sdio_free_common_cis(card); - if (card->info) - kfree(card->info); + kfree(card->info); kfree(card); }