[PATCH 0/3] [media] cx231xx: cleanup i2c adapter handling

From: Peter Rosin
Date: Mon Jul 31 2017 - 09:40:38 EST


Hi!

This seems like fairly straight forward cleanups/bugfixes. I don't
have the hardware and found the issues by reading code while doing
other things. So, it builds for me, but it's untested.

1/3 changes behavior on failure, but I think it's the right thing
to do. If it isn't for some reason, then the current code is crap
anyway, because as-is it compares with a value that is always zero
meaning that the entire "if (0 != bus->i2c_rc)"-clause with its
dev_warn can be removed from cx231xx_i2c_register.

Cheers,
Peter

Peter Rosin (3):
[media] cx231xx: fail probe if i2c_add_adapter fails
[media] cx231xx: drop return value of cx231xx_i2c_unregister
[media] cx231xx: only unregister successfully registered i2c adapters

drivers/media/usb/cx231xx/cx231xx-core.c | 3 +++
drivers/media/usb/cx231xx/cx231xx-i2c.c | 8 ++++----
drivers/media/usb/cx231xx/cx231xx.h | 4 ++--
3 files changed, 9 insertions(+), 6 deletions(-)

--
2.11.0