Linux USB
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
	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 13:54:40 +0300	[thread overview]
Message-ID: <ZQ1ycKqP37jTYYGX@kuha.fi.intel.com> (raw)
In-Reply-To: <20230922080421.35145-2-wsa+renesas@sang-engineering.com>

On Fri, Sep 22, 2023 at 10:04:18AM +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>

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.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

-- 
heikki

  reply	other threads:[~2023-09-22 10:54 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 [this message]
2023-09-22 11:50   ` Kieran Bingham
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=ZQ1ycKqP37jTYYGX@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --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