Hi Mauro,

On Monday, 11 December 2017 20:10:58 EET Mauro Carvalho Chehab wrote:
> Em Thu, 02 Nov 2017 04:51:40 +0200 Laurent Pinchart escreveu:
> > On Wednesday, 1 November 2017 23:05:45 EET Mauro Carvalho Chehab wrote:
> >> Smatch reports this warning:
> >>    drivers/media/v4l2-core/v4l2-async.c:597 v4l2_async_register_subdev()
> >> 
> >> error: uninitialized symbol 'ret'.
> >> 
> >> However, there's nothing wrong there. So, just shut up the
> >> warning.
> > 
> > Nothing wrong, really ? ret does seem to be used uninitialized when the
> > function returns at the very last line.
> 
> There's nothing wrong. If you follow the logic, you'll see that
> the line:
> 
>       return ret;
> 
> is called only at "err_unbind" label, with is called only on
> two places:
> 
>                 ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd);
>                 if (ret)
>                         goto err_unbind;
> 
>                 ret = v4l2_async_notifier_try_complete(notifier);
>                 if (ret)
>                         goto err_unbind;
> 
> There, ret is defined.
> 
> Yeah, the logic there is confusing.

I had missed the return 0 just before the error label. Sorry for the noise.

-- 
Regards,

Laurent Pinchart

Reply via email to