linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: iio: cdc: fix return value
@ 2016-12-23 18:51 Thomas Preisner
  2016-12-30 18:39 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Preisner @ 2016-12-23 18:51 UTC (permalink / raw)
  To: linux-iio, devel, linux-kernel
  Cc: linux-kernel, milan.stephan+linux, thomas.preisner+linux, lars,
	Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh

At the end of function ad7150_write_event_config(), "return 0" seems
improper. It may be better to return the value of ret.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188871

Reported-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Thomas Preisner <thomas.preisner+linux@fau.de>
Signed-off-by: Milan Stephan <milan.stephan+linux@fau.de>
---
 drivers/staging/iio/cdc/ad7150.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 6998c3d..04861eb 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -274,7 +274,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev,
 error_ret:
 	mutex_unlock(&chip->state_lock);
 
-	return 0;
+	return ret;
 }
 
 static int ad7150_read_event_value(struct iio_dev *indio_dev,
-- 
2.7.4


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

end of thread, other threads:[~2016-12-30 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-23 18:51 [PATCH] drivers: staging: iio: cdc: fix return value Thomas Preisner
2016-12-30 18:39 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).