On Thu, Aug 06, 2015 at 10:33:01AM +0100, Sifan Naeem wrote:
> drivers/spi/spi-img-spfi.c: In function 'img_spfi_setup':
> drivers/spi/spi-img-spfi.c:446: warning: 'ret' may be used
> uninitialized in this function.
> 
> Fixes: commit b03ba9e314c1 ("spi: img-spfi: fix multiple calls to request 
> gpio")
> Signed-off-by: Sifan Naeem <[email protected]>

This isn't a good commit message:

>  static int img_spfi_setup(struct spi_device *spi)
>  {
> -     int ret;
> +     int ret = -EINVAL;

You're just assigning a return value so that the compiler can't tell if
we've missed anything, that's often a sign of just papering over the
cracks without understanding the problem - for example there may be a
missing else case in some error path that the compiler was trying to
tell you about where other cleanup is needed.  The changelog should say
what the problem was and why the change solves it sensibly.

Attachment: signature.asc
Description: Digital signature

Reply via email to