From patchwork Wed Mar 5 19:34:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 3778811 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 318C29F35F for ; Wed, 5 Mar 2014 19:37:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 684BE20220 for ; Wed, 5 Mar 2014 19:37:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DF7420219 for ; Wed, 5 Mar 2014 19:37:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbaCEThO (ORCPT ); Wed, 5 Mar 2014 14:37:14 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:60341 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbaCEThN (ORCPT ); Wed, 5 Mar 2014 14:37:13 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 2BA8B13EEFD; Wed, 5 Mar 2014 19:37:13 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 1B15013F01B; Wed, 5 Mar 2014 19:37:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from joshc.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: joshc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D190F13EEFD; Wed, 5 Mar 2014 19:37:12 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id 6912863536; Wed, 5 Mar 2014 13:34:25 -0600 (CST) From: Josh Cartwright To: David Brown , Daniel Walker , Bryan Huntsman , Samuel Ortiz , Lee Jones Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mfd: pm8921: fixup probe() error path when irq invalid Date: Wed, 5 Mar 2014 13:34:25 -0600 Message-Id: <1394048065-14200-1-git-send-email-joshc@codeaurora.org> X-Mailer: git-send-email 1.9.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP platform_get_irq() returns a negative error code when an IRQ is invalid or unspecified. Make 'irq' signed to properly handle this. Cc: Stephen Boyd Signed-off-by: Josh Cartwright Reviewed-by: Stephen Boyd --- drivers/mfd/pm8921-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c index 3aab6ac..d48452d 100644 --- a/drivers/mfd/pm8921-core.c +++ b/drivers/mfd/pm8921-core.c @@ -403,9 +403,8 @@ static int pm8921_probe(struct platform_device *pdev) { struct pm8921 *pmic; struct regmap *regmap; - int rc; + int irq, rc; unsigned int val; - unsigned int irq; u32 rev; struct pm_irq_chip *chip; unsigned int nirqs = PM8921_NR_IRQS;