* [PATCH iio-next] drivers/iio: remove redundant ret variable
@ 2021-12-15 6:07 cgel.zte
2021-12-16 12:31 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-12-15 6:07 UTC (permalink / raw)
To: jic23; +Cc: lars, chi.minghao, nuno.sa, linux-iio, linux-kernel, Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value from ads8688_prog_write() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/iio/adc/ti-ads8688.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c
index 79c803537dc4..2e24717d7f55 100644
--- a/drivers/iio/adc/ti-ads8688.c
+++ b/drivers/iio/adc/ti-ads8688.c
@@ -281,12 +281,10 @@ static int ads8688_write_reg_range(struct iio_dev *indio_dev,
enum ads8688_range range)
{
unsigned int tmp;
- int ret;
tmp = ADS8688_PROG_REG_RANGE_CH(chan->channel);
- ret = ads8688_prog_write(indio_dev, tmp, range);
- return ret;
+ return ads8688_prog_write(indio_dev, tmp, range);
}
static int ads8688_write_raw(struct iio_dev *indio_dev,
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iio-next] drivers/iio: remove redundant ret variable
2021-12-15 6:07 [PATCH iio-next] drivers/iio: remove redundant ret variable cgel.zte
@ 2021-12-16 12:31 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2021-12-16 12:31 UTC (permalink / raw)
To: cgel.zte; +Cc: lars, chi.minghao, nuno.sa, linux-iio, linux-kernel, Zeal Robot
On Wed, 15 Dec 2021 06:07:10 +0000
cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return value from ads8688_prog_write() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
applied,
Thanks,
> ---
> drivers/iio/adc/ti-ads8688.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c
> index 79c803537dc4..2e24717d7f55 100644
> --- a/drivers/iio/adc/ti-ads8688.c
> +++ b/drivers/iio/adc/ti-ads8688.c
> @@ -281,12 +281,10 @@ static int ads8688_write_reg_range(struct iio_dev *indio_dev,
> enum ads8688_range range)
> {
> unsigned int tmp;
> - int ret;
>
> tmp = ADS8688_PROG_REG_RANGE_CH(chan->channel);
> - ret = ads8688_prog_write(indio_dev, tmp, range);
>
> - return ret;
> + return ads8688_prog_write(indio_dev, tmp, range);
> }
>
> static int ads8688_write_raw(struct iio_dev *indio_dev,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-16 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 6:07 [PATCH iio-next] drivers/iio: remove redundant ret variable cgel.zte
2021-12-16 12:31 ` Jonathan Cameron
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.