From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Sachin Kamat <sachin.kamat@linaro.org>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] iio:imu:adis16400 remove an unneeded check
Date: Thu, 30 Jan 2014 11:59:14 +0000 [thread overview]
Message-ID: <20140130115914.GJ12734@elgon.mountain> (raw)
We know "ret" is zero here so there is no need to check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 368660dfe135..411586f49dae 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -281,7 +281,7 @@ static ssize_t adis16400_write_frequency(struct device *dev,
st->variant->set_freq(st, val);
mutex_unlock(&indio_dev->mlock);
- return ret ? ret : len;
+ return len;
}
/* Power down the device */
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Sachin Kamat <sachin.kamat@linaro.org>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] iio:imu:adis16400 remove an unneeded check
Date: Thu, 30 Jan 2014 14:59:14 +0300 [thread overview]
Message-ID: <20140130115914.GJ12734@elgon.mountain> (raw)
We know "ret" is zero here so there is no need to check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 368660dfe135..411586f49dae 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -281,7 +281,7 @@ static ssize_t adis16400_write_frequency(struct device *dev,
st->variant->set_freq(st, val);
mutex_unlock(&indio_dev->mlock);
- return ret ? ret : len;
+ return len;
}
/* Power down the device */
next reply other threads:[~2014-01-30 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 11:59 Dan Carpenter [this message]
2014-01-30 11:59 ` [patch] iio:imu:adis16400 remove an unneeded check Dan Carpenter
2014-01-31 9:38 ` Lars-Peter Clausen
2014-01-31 9:38 ` Lars-Peter Clausen
2014-02-03 21:44 ` 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=20140130115914.GJ12734@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=sachin.kamat@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.