public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [media] cx231xx: cleanup i2c adapter handling
@ 2017-07-31 13:38 Peter Rosin
  2017-07-31 13:38 ` [PATCH 1/3] [media] cx231xx: fail probe if i2c_add_adapter fails Peter Rosin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peter Rosin @ 2017-07-31 13:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Rosin, Mauro Carvalho Chehab, linux-media

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

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

end of thread, other threads:[~2017-08-09 15:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-31 13:38 [PATCH 0/3] [media] cx231xx: cleanup i2c adapter handling Peter Rosin
2017-07-31 13:38 ` [PATCH 1/3] [media] cx231xx: fail probe if i2c_add_adapter fails Peter Rosin
2017-07-31 13:38 ` [PATCH 2/3] [media] cx231xx: drop return value of cx231xx_i2c_unregister Peter Rosin
2017-07-31 13:38 ` [PATCH 3/3] [media] cx231xx: only unregister successfully registered i2c adapters Peter Rosin
2017-08-09 14:27   ` Mauro Carvalho Chehab
2017-08-09 14:43     ` Peter Rosin
2017-08-09 15:04       ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox