From: Thomas Preisner <thomas.preisner+linux@fau.de>
To: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: linux-kernel@i4.cs.fau.de, milan.stephan+linux@fau.de,
thomas.preisner+linux@fau.de, lars@metafoo.de,
Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de,
pmeerw@pmeerw.net, gregkh@linuxfoundation.org
Subject: [PATCH] drivers: staging: iio: cdc: fix return value
Date: Fri, 23 Dec 2016 19:51:07 +0100 [thread overview]
Message-ID: <1482519067-5354-1-git-send-email-thomas.preisner+linux@fau.de> (raw)
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
next reply other threads:[~2016-12-23 18:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-23 18:51 Thomas Preisner [this message]
2016-12-30 18:39 ` [PATCH] drivers: staging: iio: cdc: fix return value Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482519067-5354-1-git-send-email-thomas.preisner+linux@fau.de \
--to=thomas.preisner+linux@fau.de \
--cc=Michael.Hennerich@analog.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=milan.stephan+linux@fau.de \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).