From patchwork Tue Sep 21 16:26:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 197442 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8LGRb57015489 for ; Tue, 21 Sep 2010 16:27:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757932Ab0IUQ1H (ORCPT ); Tue, 21 Sep 2010 12:27:07 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:64273 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757921Ab0IUQ1E (ORCPT ); Tue, 21 Sep 2010 12:27:04 -0400 Received: by pxi10 with SMTP id 10so1482900pxi.19 for ; Tue, 21 Sep 2010 09:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=Bv8Bu09TIKxYrWavWbTmWp8pyuk9Ox02MJY0i3Iccps=; b=rpRV2V30RWtRY10eok5K0WoFVTF7eVy8N8m8/yEKVbJLcos23EZANR9nAtOkjvX2pF NiARSl8ux8jTAbzpP0jx+lrklMsFbNVJwh8MO/6MAJdinWDLt8tZBF/wVdcdmusy/67q eEoXAlNx6MmpgeHM/Nc9PSDOHmnUtkDON3M4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=EKGSmWScPNA0gCdAmpJ7aolbAboFQT/hiz/cQU27Sc8Q/pHBhkkXSEtOGoKxX8Lw4L sDttjBW7XUn1vMjeh7lLkF+riBZEuJ5l5kA5gH6u9qPnJ5gEMtmeEcDVxND7jym2JBgL J9Ru6MAEOj5uUby3vsyaE9CuCgUDREV4h2t5A= Received: by 10.142.225.5 with SMTP id x5mr9260706wfg.285.1285086424330; Tue, 21 Sep 2010 09:27:04 -0700 (PDT) Received: from mailhub.coreip.homeip.net (c-24-6-153-206.hsd1.ca.comcast.net [24.6.153.206]) by mx.google.com with ESMTPS id d10sm8095536wfe.10.2010.09.21.09.27.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Sep 2010 09:27:02 -0700 (PDT) Date: Tue, 21 Sep 2010 09:26:58 -0700 From: Dmitry Torokhov To: "G, Manjunath Kondaiah" Cc: Ameya Palande , "linux-omap@vger.kernel.org" , "linux-input@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Tony Lindgren Subject: Re: [PATCH v2] OMAP3: Keypad: Fix failure exit path in probe Message-ID: <20100921162658.GA2310@core.coreip.homeip.net> References: <1285069770-4261-1-git-send-email-manjugk@ti.com> <1285076060.14206.3.camel@chotu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Sep 2010 16:27:37 +0000 (UTC) diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index fb16b5e..09bef79 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c @@ -406,23 +406,22 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev) if (error) { dev_info(kp->dbg_dev, "request_irq failed for irq no=%d\n", kp->irq); - goto err3; + goto err2; } /* Enable KP and TO interrupts now. */ reg = (u8) ~(KEYP_IMR1_KP | KEYP_IMR1_TO); if (twl4030_kpwrite_u8(kp, reg, KEYP_IMR1)) { error = -EIO; - goto err4; + goto err3; } platform_set_drvdata(pdev, kp); return 0; -err4: +err3: /* mask all events - we don't care about the result */ (void) twl4030_kpwrite_u8(kp, 0xff, KEYP_IMR1); -err3: free_irq(kp->irq, NULL); err2: input_unregister_device(input);