Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752473AbZJDFWp (ORCPT ); Sun, 4 Oct 2009 01:22:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751294AbZJDFWo (ORCPT ); Sun, 4 Oct 2009 01:22:44 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:45547 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbZJDFWo (ORCPT ); Sun, 4 Oct 2009 01:22:44 -0400 From: Mike Frysinger To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, uclinux-dist-devel@blackfin.uclinux.org, Michael Hennerich Subject: [PATCH] Input: ad7879: pass up error codes from probe functions Date: Sun, 4 Oct 2009 01:22:05 -0400 Message-Id: <1254633725-20479-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.5.rc2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1329 Lines: 42 From: Michael Hennerich 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 Signed-off-by: Mike Frysinger --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/