mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Input: ad7879: pass up error codes from probe functions
@ 2009-10-04  5:22 Mike Frysinger
  2009-10-06  5:06 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2009-10-04  5:22 UTC (permalink / raw)
  To: linux-input, Dmitry Torokhov
  Cc: linux-kernel, uclinux-dist-devel, Michael Hennerich

From: Michael Hennerich <michael.hennerich@analog.com>

If the sub-probe functions fail, we need to pass up the error code to the
higher levels from the probe function.  We currently always return 0 even
if there was an error so higher levels don't report problems.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/input/touchscreen/ad7879.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index f06332c..c21e6d3 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -645,7 +645,7 @@ static int __devinit ad7879_probe(struct spi_device *spi)
 		kfree(ts);
 	}
 
-	return 0;
+	return error;
 }
 
 static int __devexit ad7879_remove(struct spi_device *spi)
@@ -732,7 +732,7 @@ static int __devinit ad7879_probe(struct i2c_client *client,
 		kfree(ts);
 	}
 
-	return 0;
+	return error;
 }
 
 static int __devexit ad7879_remove(struct i2c_client *client)
-- 
1.6.5.rc2


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

* Re: [PATCH] Input: ad7879: pass up error codes from probe functions
  2009-10-04  5:22 [PATCH] Input: ad7879: pass up error codes from probe functions Mike Frysinger
@ 2009-10-06  5:06 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2009-10-06  5:06 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: linux-input, linux-kernel, uclinux-dist-devel, Michael Hennerich

On Sun, Oct 04, 2009 at 01:22:05AM -0400, Mike Frysinger wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
> 
> If the sub-probe functions fail, we need to pass up the error code to the
> higher levels from the probe function.  We currently always return 0 even
> if there was an error so higher levels don't report problems.
> 
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Applied, thannk you Michael.

-- 
Dmitry

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

end of thread, other threads:[~2009-10-06  5:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-04  5:22 [PATCH] Input: ad7879: pass up error codes from probe functions Mike Frysinger
2009-10-06  5:06 ` Dmitry Torokhov

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

all inboxes | Powered by JetHome®