From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] usb: typec: drop check because i2c_unregister_device() is NULL safe
Date: Fri, 22 Sep 2023 12:50:05 +0100 [thread overview]
Message-ID: <169538340502.2915094.11564554500846900939@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <20230922080421.35145-2-wsa+renesas@sang-engineering.com>
Quoting Wolfram Sang (2023-09-22 09:04:18)
> 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>
And this is the same pattern here so:
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> Build tested only. Please apply to your tree.
>
> drivers/usb/typec/anx7411.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
> index 221604f933a4..b12a07edc71b 100644
> --- a/drivers/usb/typec/anx7411.c
> +++ b/drivers/usb/typec/anx7411.c
> @@ -1550,8 +1550,7 @@ static void anx7411_i2c_remove(struct i2c_client *client)
> if (plat->workqueue)
> destroy_workqueue(plat->workqueue);
>
> - if (plat->spi_client)
> - i2c_unregister_device(plat->spi_client);
> + i2c_unregister_device(plat->spi_client);
>
> if (plat->typec.role_sw)
> usb_role_switch_put(plat->typec.role_sw);
> --
> 2.30.2
>
next prev parent reply other threads:[~2023-09-22 11:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 8:04 [PATCH 0/3] treewide: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2023-09-22 8:04 ` [PATCH 1/3] usb: typec: " Wolfram Sang
2023-09-22 10:54 ` Heikki Krogerus
2023-09-22 11:50 ` Kieran Bingham [this message]
2023-09-25 7:44 ` Geert Uytterhoeven
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=169538340502.2915094.11564554500846900939@ping.linuxembedded.co.uk \
--to=kieran.bingham@ideasonboard.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@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