All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe()
@ 2021-05-18  9:56 ` Tang Bin
  0 siblings, 0 replies; 6+ messages in thread
From: Tang Bin @ 2021-05-18  9:56 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh
  Cc: linux-iio, devel, linux-kernel, Tang Bin

In the function ad7746_probe(), the initialized value of 'ret' is unused,
because it will be assigned by the function i2c_smbus_write_byte_data(),
thus remove it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/staging/iio/cdc/ad7746.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index dfd71e99e..be4ef454d 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -680,7 +680,7 @@ static int ad7746_probe(struct i2c_client *client,
 	struct ad7746_chip_info *chip;
 	struct iio_dev *indio_dev;
 	unsigned char regval = 0;
-	int ret = 0;
+	int ret;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
 	if (!indio_dev)
-- 
2.20.1.windows.1




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

* [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe()
@ 2021-05-18  9:56 ` Tang Bin
  0 siblings, 0 replies; 6+ messages in thread
From: Tang Bin @ 2021-05-18  9:56 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh
  Cc: linux-iio, devel, linux-kernel, Tang Bin

In the function ad7746_probe(), the initialized value of 'ret' is unused,
because it will be assigned by the function i2c_smbus_write_byte_data(),
thus remove it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/staging/iio/cdc/ad7746.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index dfd71e99e..be4ef454d 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -680,7 +680,7 @@ static int ad7746_probe(struct i2c_client *client,
 	struct ad7746_chip_info *chip;
 	struct iio_dev *indio_dev;
 	unsigned char regval = 0;
-	int ret = 0;
+	int ret;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
 	if (!indio_dev)
-- 
2.20.1.windows.1



_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe()
  2021-05-18  9:56 ` Tang Bin
@ 2021-05-18 10:16   ` Dan Carpenter
  -1 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-05-18 10:16 UTC (permalink / raw)
  To: Tang Bin
  Cc: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh,
	linux-iio, devel, linux-kernel

On Tue, May 18, 2021 at 05:56:47PM +0800, Tang Bin wrote:
> In the function ad7746_probe(), the initialized value of 'ret' is unused,
> because it will be assigned by the function i2c_smbus_write_byte_data(),
> thus remove it.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


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

* Re: [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe()
@ 2021-05-18 10:16   ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-05-18 10:16 UTC (permalink / raw)
  To: Tang Bin
  Cc: devel, lars, Michael.Hennerich, linux-iio, gregkh, linux-kernel,
	pmeerw, knaack.h, jic23

On Tue, May 18, 2021 at 05:56:47PM +0800, Tang Bin wrote:
> In the function ad7746_probe(), the initialized value of 'ret' is unused,
> because it will be assigned by the function i2c_smbus_write_byte_data(),
> thus remove it.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe()
  2021-05-18 10:16   ` Dan Carpenter
@ 2021-05-18 18:00     ` Jonathan Cameron
  -1 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2021-05-18 18:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Tang Bin, lars, Michael.Hennerich, knaack.h, pmeerw, gregkh,
	linux-iio, devel, linux-kernel, Lucas Stankus

On Tue, 18 May 2021 13:16:26 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> On Tue, May 18, 2021 at 05:56:47PM +0800, Tang Bin wrote:
> > In the function ad7746_probe(), the initialized value of 'ret' is unused,
> > because it will be assigned by the function i2c_smbus_write_byte_data(),
> > thus remove it.
> > 
> > Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>  
> 
> Thanks!
> 
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> regards,
> dan carpenter
> 
As this doesn't (I think) overlap with Lucas' series I've applied this
one to the togreg branch of iio.git and pushed it out as testing for the
autobuilders to see if we missed anything.


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

* Re: [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe()
@ 2021-05-18 18:00     ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2021-05-18 18:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: devel, lars, Michael.Hennerich, Tang Bin, linux-iio, gregkh,
	linux-kernel, pmeerw, knaack.h, Lucas Stankus

On Tue, 18 May 2021 13:16:26 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> On Tue, May 18, 2021 at 05:56:47PM +0800, Tang Bin wrote:
> > In the function ad7746_probe(), the initialized value of 'ret' is unused,
> > because it will be assigned by the function i2c_smbus_write_byte_data(),
> > thus remove it.
> > 
> > Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>  
> 
> Thanks!
> 
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> regards,
> dan carpenter
> 
As this doesn't (I think) overlap with Lucas' series I've applied this
one to the togreg branch of iio.git and pushed it out as testing for the
autobuilders to see if we missed anything.

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2021-05-18 17:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  9:56 [PATCH] staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe() Tang Bin
2021-05-18  9:56 ` Tang Bin
2021-05-18 10:16 ` Dan Carpenter
2021-05-18 10:16   ` Dan Carpenter
2021-05-18 18:00   ` Jonathan Cameron
2021-05-18 18:00     ` 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.