On Tue, Jan 05, 2021 at 05:18:08PM +0100, Hans Verkuil wrote: > On 05/01/2021 13:49, Sakari Ailus wrote: > > GCC with W=2 level of kernel compiler warnings warns about the use of > > uninitialised variables in a few locations. While these uninitialised > > variables were not used in reality, this still produced compiler warnings. > > > > Address this by assigning the variables to NULL and checking for NULL in > > places it is not expected, returning -EPROTO in that case. This provides > > at least some sanity checking at runtime as the compiler appears unable to > > do that at compile time. > > > > Reported-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > > Acked-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> > > This fixes the warnings! Thanks! I think I'll switch the error code to something else. -EPROTO is already in use, so I'll send v2 with -EIO. -- Sakari Ailus