From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
"Jacopo Mondi" <jacopo+renesas@jmondi.org>,
"Kieran Bingham" <kieran.bingham+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: Mon, 25 Sep 2023 14:59:38 +0300 [thread overview]
Message-ID: <20230925115938.GB375@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230922080421.35145-3-wsa+renesas@sang-engineering.com>
On Fri, Sep 22, 2023 at 10:04:19AM +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>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
I'll take this in my tree and send a pull request if Sakari doesn't pick
up the patch himself.
> ---
> 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");
>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-09-25 11:59 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
2023-09-25 11:50 ` Geert Uytterhoeven
2023-09-25 11:59 ` Laurent Pinchart [this message]
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=20230925115938.GB375@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=jacopo+renesas@jmondi.org \
--cc=kieran.bingham+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®