From: Wolfram Sang <wsa@the-dreams.de>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe
Date: Tue, 3 Sep 2019 19:52:18 +0200 [thread overview]
Message-ID: <20190903175218.GE2171@ninjato> (raw)
In-Reply-To: <20190820153441.7693-1-wsa+renesas@sang-engineering.com>
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
On Tue, Aug 20, 2019 at 05:34:40PM +0200, Wolfram Sang wrote:
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
Hans, are you OK with this change?
> Build tested only, buildbot is happy, too.
>
> Please apply to your tree.
>
> drivers/i2c/busses/i2c-cht-wc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index 66af44bfa67d..3e2608a65c06 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -363,8 +363,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
> {
> struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
>
> - if (adap->client)
> - i2c_unregister_device(adap->client);
> + i2c_unregister_device(adap->client);
> i2c_del_adapter(&adap->adapter);
> irq_domain_remove(adap->irq_domain);
>
> --
> 2.20.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-09-03 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 15:34 [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2019-09-03 17:52 ` Wolfram Sang [this message]
2019-09-04 8:26 ` Hans de Goede
2019-09-04 21:12 ` Wolfram Sang
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=20190903175218.GE2171@ninjato \
--to=wsa@the-dreams.de \
--cc=hdegoede@redhat.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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