[media] tvp5150: return I2C write operation failure to callers
commitcacdd6a4a8d5115da2767769b44bd435455f6424
authorJavier Martinez Canillas <javier@osg.samsung.com>
Fri, 15 Apr 2016 01:00:07 +0000 (14 22:00 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 9 May 2016 17:44:16 +0000 (9 14:44 -0300)
tree92d660454b4647cd6e2f5ff5e6d430f2aae33e62
parent11a2a949d05e9d2d9823f0c45fa476743d9e462b
[media] tvp5150: return I2C write operation failure to callers

The tvp5150_write() function calls i2c_smbus_write_byte_data() that
can fail but does not propagate the error to the caller. Instead it
just prints a debug, so callers can't know if the operation failed.

So change the function to return the error code to the caller so it
knows that the write failed and also print an error instead of just
printing a debug information.

While being there remove the inline keyword from tvp5150_write() to
make it consistent with tvp5150_read() and also because it's called
in a lot of places, so making inline is in fact counter productive
since it makes the kernel image size to be much bigger (~16 KiB).

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/tvp5150.c