lkml.org 
[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [STABLE-4.13] [media] imx-media-of: avoid uninitialized variable warning
On Wed, Oct 04, 2017 at 03:34:55PM +0200, Arnd Bergmann wrote:
> Replaces upstream commit 0b2e9e7947e7 ("media: staging/imx: remove
> confusing IS_ERR_OR_NULL usage")
>
> We get a harmless warning about a potential uninitialized variable
> use in the driver:
>
> drivers/staging/media/imx/imx-media-of.c: In function 'of_parse_subdev':
> drivers/staging/media/imx/imx-media-of.c:216:4: warning: 'remote_np' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> I reworked that code to be easier to understand by gcc in mainline,
> but that commit is too large to backport. This is a much simpler
> workaround, avoiding the warning by adding a fake initialization
> to the variable. The driver was only introduced in linux-4.13,
> so the workaround is not needed for earlier stable kernels.
>
> Fixes: e130291212df ("[media] media: Add i.MX media core driver")

I normally leave off the Fixes tag when it's not a bugfix. The warning
is, as you mentioned, harmless.

regards,
dan carpenter

\
 
 \ /
  Last update: 2017-10-05 14:34    [W:0.036 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site