From patchwork Tue Nov 20 09:13:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1772061 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 1A6C03FC5A for ; Tue, 20 Nov 2012 09:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798Ab2KTJT2 (ORCPT ); Tue, 20 Nov 2012 04:19:28 -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 S1752566Ab2KTJT1 (ORCPT ); Tue, 20 Nov 2012 04:19:27 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so1160372dak.19 for ; Tue, 20 Nov 2012 01:19:27 -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:x-gm-message-state; bh=t6eGS95MPJrQhBx7UpF5vYMD0s3bKeL4/2/iex9Mwks=; b=jzVB/wKtgmTi5569MSShNaGCodIC0wIxm4HXQUDA9WNnr7MHMblw0QoeSv9EjnpNJS 1Lj6qqoGKb2vWevkDQIxWRjsEbGycNWxvnGTinOy+49UXc8+tb92B4gtS3LuVmSHFw5m EdlARsXUr+hVeOJtOiKM3R91e1bwY56JPU9crsrSdDh+YKhUfRwNErnF+5zH9EHjJvL2 1cXlF9GI/gdSOTFlNmbSU3SfedcvPzYWdzT6m0MIxASZiWf6wQtg4oDdbe6V/MyVSr7J xQJpv4t0kzK9VoInOET6Tj90Kn3MgoaXicN7qoRCI4x16IsMVxOIwJfLqILw4ZbTKfXr xrFg== Received: by 10.68.189.163 with SMTP id gj3mr47219688pbc.110.1353403167048; Tue, 20 Nov 2012 01:19:27 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ix9sm7778744pbc.7.2012.11.20.01.19.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:19:26 -0800 (PST) From: Sachin Kamat To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] mmc: Remove redundant null check before kfree in sdio_bus.c Date: Tue, 20 Nov 2012 14:43:16 +0530 Message-Id: <1353402797-6785-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQleF7FqWXJYaGl1kNP9htLZXo+tgrLKfBj0qlivld05hFrPEMGnWVVhrbijZV41w7zFhlEu 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/sdio_bus.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 6bf6879..fdcf9e3 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -258,8 +258,7 @@ static void sdio_release_func(struct device *dev) sdio_free_func_cis(func); - if (func->info) - kfree(func->info); + kfree(func->info); kfree(func); }