From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-renesas-soc@vger.kernel.org
Cc: "Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Jacopo Mondi" <jacopo+renesas@jmondi.org>,
"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] media: i2c: drop check because i2c_unregister_device() is NULL safe
Date: Fri, 22 Sep 2023 09:14:30 +0100 [thread overview]
Message-ID: <169537047013.2915094.9440302098198891842@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <20230922080421.35145-3-wsa+renesas@sang-engineering.com>
Hi Wolfram,
Quoting Wolfram Sang (2023-09-22 09:04:19)
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
Well spotted!
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> Build tested only. Please apply to your tree.
>
> drivers/media/i2c/rdacm20.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c
> index f4e2e2f3972a..b4647bda8c21 100644
> --- a/drivers/media/i2c/rdacm20.c
> +++ b/drivers/media/i2c/rdacm20.c
> @@ -625,8 +625,7 @@ static int rdacm20_probe(struct i2c_client *client)
> v4l2_ctrl_handler_free(&dev->ctrls);
> error:
> media_entity_cleanup(&dev->sd.entity);
> - if (dev->sensor)
> - i2c_unregister_device(dev->sensor);
> + i2c_unregister_device(dev->sensor);
>
> dev_err(&client->dev, "probe failed\n");
>
> --
> 2.30.2
>
next prev parent reply other threads:[~2023-09-22 8:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 8:04 [PATCH 0/3] treewide: " 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
2023-09-25 7:44 ` Geert Uytterhoeven
2023-09-22 8:04 ` [PATCH 2/3] media: i2c: " Wolfram Sang
2023-09-22 8:14 ` Kieran Bingham [this message]
2023-09-25 11:50 ` Geert Uytterhoeven
2023-09-25 11:59 ` Laurent Pinchart
2023-09-22 8:04 ` [PATCH 3/3] media: dvb-frontends: " Wolfram Sang
2023-09-22 11:49 ` Kieran Bingham
2023-09-25 11:52 ` 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=169537047013.2915094.9440302098198891842@ping.linuxembedded.co.uk \
--to=kieran.bingham+renesas@ideasonboard.com \
--cc=jacopo+renesas@jmondi.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--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
all inboxes | Powered by JetHome®