diff mbox

[01/11] tda9887: remove an warning when compiling for alpha

Message ID 1383334770-27130-2-git-send-email-m.chehab@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Nov. 1, 2013, 7:39 p.m. UTC
There's no need to zero the buffer, as if the routine gets an error,
rc will be different than one.

That fixes the following warning:
	/devel/v4l/ktest-build/drivers/media/tuners/tda9887.c: In function 'tda9887_status':
	/devel/v4l/ktest-build/drivers/media/tuners/tda9887.c:539:2: warning: value computed is not used [-Wunused-value]

While here, fix the coding style on this function.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
---
 drivers/media/tuners/tda9887.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/tuners/tda9887.c b/drivers/media/tuners/tda9887.c
index 300005c535ba..9823248d743f 100644
--- a/drivers/media/tuners/tda9887.c
+++ b/drivers/media/tuners/tda9887.c
@@ -536,8 +536,8 @@  static int tda9887_status(struct dvb_frontend *fe)
 	unsigned char buf[1];
 	int rc;
 
-	memset(buf,0,sizeof(buf));
-	if (1 != (rc = tuner_i2c_xfer_recv(&priv->i2c_props,buf,1)))
+	rc = tuner_i2c_xfer_recv(&priv->i2c_props, buf, 1);
+	if (rc != 1)
 		tuner_info("i2c i/o error: rc == %d (should be 1)\n", rc);
 	dump_read_message(fe, buf);
 	return 0;