diff mbox series

media: i2c: rdacm2: Remove an incorrect fwnode_handle_put() call

Message ID d9230082aefcb7bab6363c51c08598eb5ab62cfc.1693037086.git.christophe.jaillet@wanadoo.fr
State Superseded
Headers show
Series media: i2c: rdacm2: Remove an incorrect fwnode_handle_put() call | expand

Commit Message

Christophe JAILLET Aug. 26, 2023, 8:05 a.m. UTC
The commit in Fixes has removed an fwnode_handle_put() call in the error
handling path of the probe.

Remove the same call from the remove function.

Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
/!\   This patch is highly speculative. Review with care.   /!\

If it is correct, it is likely that other similar issue lurk in commit
1029939b3782. I've not looked in detail and my cocci script did not
trigger on them but drivers/media/i2c/max9286.c also looks like a
similar candidate.
---
 drivers/media/i2c/rdacm21.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jacopo Mondi Aug. 28, 2023, 7:48 a.m. UTC | #1
Hi Christophe

On Sat, Aug 26, 2023 at 10:05:06AM +0200, Christophe JAILLET wrote:
> The commit in Fixes has removed an fwnode_handle_put() call in the error
> handling path of the probe.
>
> Remove the same call from the remove function.
>
> Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> ---
> /!\   This patch is highly speculative. Review with care.   /!\
>
> If it is correct, it is likely that other similar issue lurk in commit
> 1029939b3782. I've not looked in detail and my cocci script did not
> trigger on them but drivers/media/i2c/max9286.c also looks like a
> similar candidate.

I think the call to  fwnode_handle_put(priv->sd.fwnode) in
max9286_v4l2_unregister() can indeed be removed, yes!

Thanks
  j

> ---
>  drivers/media/i2c/rdacm21.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
> index a36a709243fd..3e22df36354f 100644
> --- a/drivers/media/i2c/rdacm21.c
> +++ b/drivers/media/i2c/rdacm21.c
> @@ -608,7 +608,6 @@ static void rdacm21_remove(struct i2c_client *client)
>  	v4l2_async_unregister_subdev(&dev->sd);
>  	v4l2_ctrl_handler_free(&dev->ctrls);
>  	i2c_unregister_device(dev->isp);
> -	fwnode_handle_put(dev->sd.fwnode);
>  }
>
>  static const struct of_device_id rdacm21_of_ids[] = {
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
index a36a709243fd..3e22df36354f 100644
--- a/drivers/media/i2c/rdacm21.c
+++ b/drivers/media/i2c/rdacm21.c
@@ -608,7 +608,6 @@  static void rdacm21_remove(struct i2c_client *client)
 	v4l2_async_unregister_subdev(&dev->sd);
 	v4l2_ctrl_handler_free(&dev->ctrls);
 	i2c_unregister_device(dev->isp);
-	fwnode_handle_put(dev->sd.fwnode);
 }
 
 static const struct of_device_id rdacm21_of_ids[] = {