From patchwork Fri Aug 21 14:05:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 43109 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7LE17AX016552 for ; Fri, 21 Aug 2009 14:01:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754626AbZHUOBE (ORCPT ); Fri, 21 Aug 2009 10:01:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754716AbZHUOBE (ORCPT ); Fri, 21 Aug 2009 10:01:04 -0400 Received: from mail-ew0-f207.google.com ([209.85.219.207]:40985 "EHLO mail-ew0-f207.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754626AbZHUOBC (ORCPT ); Fri, 21 Aug 2009 10:01:02 -0400 Received: by ewy3 with SMTP id 3so659663ewy.18 for ; Fri, 21 Aug 2009 07:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=/BInv7NOfOxm9LGaUvJl2aenZO3XsGq9RVwCj+wgWeU=; b=gTAh4i5Mzi5C09eqE1CQI7oNRRAtkU8uMsQYJjKzCcBooBkBACiSh9ulD79DgUak7Q ey1mRAAZJdMhZb437U5MtZPfGB1gdbpGQJ2v0ikEvnehSeKI0llNIFHyvDoLEPOZnKbd jh4KiapRk+vP+vsWUflsl2kXrw6DefwS6DzrQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=q09Ry2OfrUofPGaoGdFRfUgFZ+39XrnXIDyUG6a1h8MgvIYPOrFy5ktPBI5tmpmcrT yLqXnAVNDRxVwKCEp9mpsZVqBtteguukeksPELLFR/+zcTK4zgvVdpXOozBj64R8TcTV so4dKVcZOEkCq7u8lfrQCYNHIAa3zCi/sB06Q= Received: by 10.210.127.15 with SMTP id z15mr454674ebc.35.1250863260548; Fri, 21 Aug 2009 07:01:00 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 7sm2394804eyg.55.2009.08.21.07.00.59 (version=SSLv3 cipher=RC4-MD5); Fri, 21 Aug 2009 07:00:59 -0700 (PDT) Message-ID: <4A8EA9B8.2090302@gmail.com> Date: Fri, 21 Aug 2009 16:05:44 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: Dmitry Torokhov , linux-input@vger.kernel.org, Andrew Morton Subject: [PATCH] Input: Fix cleaning up KEY_STROBEs after error in tosakbd_probe() Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Direct to fail2 to gpio_free() the KEY_STROBEs as well as the KEY_SENSEs. Signed-off-by: Roel Kluin --- Or is there an obscure reason why this shouldn't happen? -- To unsubscribe from this list: send the line "unsubscribe linux-input" 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/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c index 677276b..72c06ef 100644 --- a/drivers/input/keyboard/tosakbd.c +++ b/drivers/input/keyboard/tosakbd.c @@ -344,7 +344,7 @@ static int __devinit tosakbd_probe(struct platform_device *pdev) { " direction for GPIO %d, error %d\n", gpio, error); gpio_free(gpio); - goto fail; + goto fail2; } } @@ -353,7 +353,7 @@ static int __devinit tosakbd_probe(struct platform_device *pdev) { if (error) { printk(KERN_ERR "tosakbd: Unable to register input device, " "error: %d\n", error); - goto fail; + goto fail2; } printk(KERN_INFO "input: Tosa Keyboard Registered\n");