Re: [PATCH] max9286: balance v4l2_async refcnting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kieran!

On Thu, Feb 13, 2020 at 01:06:31PM +0000, Kieran Bingham wrote:
> On 13/02/2020 10:21, Kieran Bingham wrote:
> > When we add fwnodes to V4L2 notifiers through
> > v4l2_async_notifier_add_subdev they are stored internally in V4L2 core,
> > and have a reference count released upon any call to
> > v4l2_async_notifier_cleanup().
> >
> > Ensure that any source successfully added to a notifier gets its fwnode
> > reference count increased accordingly.
> >
> > Signed-off-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>
> > ---
> >  drivers/media/i2c/max9286.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
> > index f3311210a666..62615e6ab710 100644
> > --- a/drivers/media/i2c/max9286.c
> > +++ b/drivers/media/i2c/max9286.c
> > @@ -665,6 +665,11 @@ static int max9286_v4l2_async_register(struct max9286_priv *priv)
> >  			v4l2_async_notifier_cleanup(&priv->notifier);
> >  			return ret;
> >  		}
> > +
> > +		/* Balance the refernce counting handled through
>
> I've correctly moved this to a new line and fixed up the reference
> spelling :)

Good, thanks!

I think you could squash all of these in the next max9286 iteration!

Acked-by: Jacopo Mondi <jacopo@xxxxxxxxxx>

Thanks
   j
>
> > +		 * v4l2_async_notifier_cleanup()
> > +		 */
> > +		fwnode_handle_get(source->fwnode);
> >  	}
> >
> >  	priv->notifier.ops = &max9286_notify_ops;
> >
>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux