From patchwork Thu May 17 13:45:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 8752 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 876E223E23 for ; Thu, 17 May 2012 13:46:55 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 47E6DA183E2 for ; Thu, 17 May 2012 13:46:55 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so2182690ggn.11 for ; Thu, 17 May 2012 06:46:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=gtbWpeooLFeWhpSjlS/wftN0yA0k3NtNA563DCq3jio=; b=joWngxgxrR2qbrb5o9uh+sSXDoDhVSOXoCcBSobcncaIUjwhha/m+v8NzXsHl7KR/3 lhv7PUqRjUUzZ34ttLrxMfmLZClj0Ns5xVDRs+jv7gOCBm2uDChH5er3StKOMmDUelxY gVy8dQOS0wXxdtUlbUdemjZQd/gGk1zZUoedHekmulvpnbH150qVGPpU1lUEoS/qdY6C 8sKm/a0Bc+SYPPIMYtA/uliN7/qBn/JMRkKmtgD2qClZwfK5mffLJHL8X6nGjsbzt+N4 sEwe7Z/OazhLWD97fblHTdaGIQcId6303W5iHU6E33oH0RTmxiGOJKB5TeY+chGWbk6B MFqg== Received: by 10.50.185.233 with SMTP id ff9mr13342489igc.57.1337262414675; Thu, 17 May 2012 06:46:54 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp29058ibd; Thu, 17 May 2012 06:46:53 -0700 (PDT) Received: by 10.180.102.3 with SMTP id fk3mr18649006wib.9.1337262413450; Thu, 17 May 2012 06:46:53 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id 81si7452963wej.18.2012.05.17.06.46.53 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 May 2012 06:46:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f172.google.com with SMTP id hj8so4303012wib.13 for ; Thu, 17 May 2012 06:46:53 -0700 (PDT) Received: by 10.180.8.69 with SMTP id p5mr51048311wia.17.1337262412985; Thu, 17 May 2012 06:46:52 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id h8sm21166277wix.4.2012.05.17.06.46.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 May 2012 06:46:52 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com Cc: Lee Jones Subject: [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver Date: Thu, 17 May 2012 14:45:20 +0100 Message-Id: <1337262323-27692-16-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1337262323-27692-1-git-send-email-lee.jones@linaro.org> References: <1337262323-27692-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkZCoPK3z2GouvCqNm47lX45hROBNjs/NClXfXMgimpeAEE2PZ62gAwMaC7UQReeinUrtM2 Before this patch if probe failed to find the platform IRQ it would attempt to print a message out using dev_err, which in turn was being passed an unassigned pointer. This patch ensures the information passed to dev_err is correct. Signed-off-by: Lee Jones --- drivers/mfd/ab8500-gpadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index c39fc71..c1656ab 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c @@ -584,7 +584,7 @@ static int __devinit ab8500_gpadc_probe(struct platform_device *pdev) gpadc->irq = platform_get_irq_byname(pdev, "SW_CONV_END"); if (gpadc->irq < 0) { - dev_err(gpadc->dev, "failed to get platform irq-%d\n", + dev_err(&pdev->dev, "failed to get platform irq-%d\n", gpadc->irq); ret = gpadc->irq; goto fail;