mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org
Subject: [PATCH 0/3] [media] cx231xx: cleanup i2c adapter handling
Date: Mon, 31 Jul 2017 15:38:49 +0200	[thread overview]
Message-ID: <20170731133852.8013-1-peda@axentia.se> (raw)

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

             reply	other threads:[~2017-07-31 13:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 13:38 Peter Rosin [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170731133852.8013-1-peda@axentia.se \
    --to=peda@axentia.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®