public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] TSC2301 touchscreen: fix error path in driver probe function
@ 2007-03-22  9:14 Jarkko Nikula
  2007-03-30 19:14 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Nikula @ 2007-03-22  9:14 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 17 bytes --]

Patch from Imre.

[-- Attachment #2: 0001-TSC2301-touchscreen-fix-error-path-in-driver-probe-function.txt --]
[-- Type: text/plain, Size: 1313 bytes --]

>From a24e92946d20026e7d982c53abf816d5bf142df7 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@solidboot.com>
Date: Mon, 12 Mar 2007 17:46:25 +0200
Subject: [PATCH] TSC2301 touchscreen: fix error path in driver probe function

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
---
 drivers/spi/tsc2301-ts.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/tsc2301-ts.c b/drivers/spi/tsc2301-ts.c
index da91736..8657b56 100644
--- a/drivers/spi/tsc2301-ts.c
+++ b/drivers/spi/tsc2301-ts.c
@@ -629,19 +629,23 @@ int __devinit tsc2301_ts_init(struct tsc2301 *tsc,
 	}
 	set_irq_wake(ts->irq, 1);
 
-	device_create_file(&tsc->spi->dev, &dev_attr_pen_down);
-	device_create_file(&tsc->spi->dev, &dev_attr_disable_ts);
+	if (device_create_file(&tsc->spi->dev, &dev_attr_pen_down) < 0)
+		goto err4;
+	if (device_create_file(&tsc->spi->dev, &dev_attr_disable_ts) < 0)
+		goto err5;
 
 	r = input_register_device(idev);
 	if (r < 0) {
 		dev_err(&tsc->spi->dev, "can't register touchscreen device\n");
-		goto err4;
+		goto err6;
 	}
 
 	return 0;
-err4:
+err6:
 	device_remove_file(&tsc->spi->dev, &dev_attr_disable_ts);
+err5:
 	device_remove_file(&tsc->spi->dev, &dev_attr_pen_down);
+err4:
 	free_irq(ts->irq, tsc);
 err3:
 	tsc2301_ts_stop_scan(tsc);
-- 
1.4.4.4


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-30 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-22  9:14 [PATCH 1/4] TSC2301 touchscreen: fix error path in driver probe function Jarkko Nikula
2007-03-30 19:14 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox