linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: buffer: remove unneeded test
@ 2015-05-30 20:35 Laurent Navet
  2015-06-01  7:48 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2015-05-30 20:35 UTC (permalink / raw)
  To: jic23; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, Laurent Navet

The same code is executed regardless ret value, so this test
can be removed.
Also fix coverity scan CID 1268786.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/iio/industrialio-buffer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index df919f4..e7fbcce 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -806,8 +806,6 @@ static ssize_t iio_buffer_store_enable(struct device *dev,
 		ret = __iio_update_buffers(indio_dev,
 					 NULL, indio_dev->buffer);
 
-	if (ret < 0)
-		goto done;
 done:
 	mutex_unlock(&indio_dev->mlock);
 	return (ret < 0) ? ret : len;
-- 
2.1.4


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

* Re: [PATCH] iio: buffer: remove unneeded test
  2015-05-30 20:35 [PATCH] iio: buffer: remove unneeded test Laurent Navet
@ 2015-06-01  7:48 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-06-01  7:48 UTC (permalink / raw)
  To: Laurent Navet; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel

On 30/05/15 21:35, Laurent Navet wrote:
> The same code is executed regardless ret value, so this test
> can be removed.
> Also fix coverity scan CID 1268786.
> 
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Applied to the togreg branch of iio.git.  Will push out
as testing when not stuck in a cleanroom with no net access
(but curiously with my less than entirely clean laptop ;)

Jonathan
> ---
>  drivers/iio/industrialio-buffer.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index df919f4..e7fbcce 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -806,8 +806,6 @@ static ssize_t iio_buffer_store_enable(struct device *dev,
>  		ret = __iio_update_buffers(indio_dev,
>  					 NULL, indio_dev->buffer);
>  
> -	if (ret < 0)
> -		goto done;
>  done:
>  	mutex_unlock(&indio_dev->mlock);
>  	return (ret < 0) ? ret : len;
> 


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

end of thread, other threads:[~2015-06-01 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-30 20:35 [PATCH] iio: buffer: remove unneeded test Laurent Navet
2015-06-01  7:48 ` 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).