[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6FF983D6-F754-42CB-8745-EF1DFA76B12F@getmailspring.com>
Date: Mon, 10 Aug 2020 10:10:45 -0300
From: "Daniel W. S. Almeida" <dwlsalmeida@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: "skhan@...uxfoundation.org" <skhan@...uxfoundation.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"linux-media@...r.kernel.org"
<linux-media@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 04/20] media: uvc: uvc_v4l2.c: add temp variable for
list iteration
Hi Laurent, thanks for reviewing!
> If no entity is found by this loop the next line will dereference a NULL
> pointer. There's a similar issue below.
You mean this line, right?
> pin = iterm->id;
In which case, yes I missed it!
> I think the issues reported by coccinelle are false positives, as every
> chain is guaranteed to have the proper input terminals (ITERM). This is
> verified when constructing the chain at probe time.
I thought so too, but I thought it would be nice to get rid of the
warning anyways. Probably other people will send patches for this same
issue in the future too, i.e. until this warning is not there anymore.
Do you have any suggestions or should we just leave this alone? :)
Maybe:
if (iterm)
pin = iterm->id
This line will return an error if the iterm is not found anyway:
if (iterm == NULL || iterm->id != pin)
return -EINVAL
Let me know what you think
- Daniel
Powered by blists - more mailing lists