From patchwork Sun Aug 21 11:52:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Tarasikov X-Patchwork-Id: 1083342 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7LBrG2D005868 for ; Sun, 21 Aug 2011 11:53:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754418Ab1HULxX (ORCPT ); Sun, 21 Aug 2011 07:53:23 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:56197 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754344Ab1HULxX (ORCPT ); Sun, 21 Aug 2011 07:53:23 -0400 Received: by mail-bw0-f46.google.com with SMTP id 11so3108860bke.19 for ; Sun, 21 Aug 2011 04:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=NN/vAYUPn9DsbjJYppWnsht5Z2xlgNDk8F6gAzcFyLg=; b=tXFbC6mp9VRyqFugirF+MFXwUTCOshWgnuS5lZRUGy98JrffhOtMvkYzjsXLazJREL f4EiEmEavp8E0RdauoERFLbaXWBU4yvDR/UlNakM3vme+0synW1DYdszsHTFzWHLLsMS KdF3S7KHnQEKhh7DKpeF/TOSv99vh0vLQpzBo= Received: by 10.204.8.202 with SMTP id i10mr475248bki.101.1313927602376; Sun, 21 Aug 2011 04:53:22 -0700 (PDT) Received: from localhost.localdomain ([86.110.163.19]) by mx.google.com with ESMTPS id v22sm1586885bkw.12.2011.08.21.04.53.20 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Aug 2011 04:53:21 -0700 (PDT) From: Alexander Tarasikov To: davidb@codeaurora.org, dwalker@fifo99.com, bryanh@codeaurora.org, cjb@laptop.org Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, Alexander Tarasikov Subject: [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup Date: Sun, 21 Aug 2011 15:52:43 +0400 Message-Id: <1313927564-10355-2-git-send-email-alexander.tarasikov@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1313927564-10355-1-git-send-email-alexander.tarasikov@gmail.com> References: <1313927564-10355-1-git-send-email-alexander.tarasikov@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 21 Aug 2011 11:53:24 +0000 (UTC) The use of && instead of || caused a NULL pointer dereference if gpio setup was not passed via platform data Signed-off-by: Alexander Tarasikov --- drivers/mmc/host/msm_sdcc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index a4c865a..d06539d 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c @@ -939,7 +939,7 @@ static void msmsdcc_setup_gpio(struct msmsdcc_host *host, bool enable) struct msm_mmc_gpio_data *curr; int i, rc = 0; - if (!host->plat->gpio_data && host->gpio_config_status == enable) + if (!host->plat->gpio_data || host->gpio_config_status == enable) return; curr = host->plat->gpio_data;