提交 afdb4ca2 编写于 作者: M Mauro Carvalho Chehab

media: tda9840: cleanup a warning

There's a false positive warning there:
	drivers/media/i2c/tda9840.c:79 tda9840_status() error: uninitialized symbol 'byte'.

Change the code to match our coding style, in order to fix it.
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 e771bdf5
...@@ -68,11 +68,15 @@ static void tda9840_write(struct v4l2_subdev *sd, u8 reg, u8 val) ...@@ -68,11 +68,15 @@ static void tda9840_write(struct v4l2_subdev *sd, u8 reg, u8 val)
static int tda9840_status(struct v4l2_subdev *sd) static int tda9840_status(struct v4l2_subdev *sd)
{ {
struct i2c_client *client = v4l2_get_subdevdata(sd); struct i2c_client *client = v4l2_get_subdevdata(sd);
int rc;
u8 byte; u8 byte;
if (1 != i2c_master_recv(client, &byte, 1)) { rc = i2c_master_recv(client, &byte, 1);
if (rc != 1) {
v4l2_dbg(1, debug, sd, v4l2_dbg(1, debug, sd,
"i2c_master_recv() failed\n"); "i2c_master_recv() failed\n");
if (rc < 0)
return rc;
return -EIO; return -EIO;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册