Re: [PATCH] spi: Initialize variable to prevent uninitialized warning

From: Mark Brown
Date: Thu Aug 07 2014 - 05:55:31 EST


On Wed, Aug 06, 2014 at 10:22:19PM -0700, Guenter Roeck wrote:

> So if we ever hit that uninitialized case, where bits_per_word is
> neither 8 nor 16, we'll have ops set to NULL and end up wondering
> why the kernel crashes a bit further down in the code. Not really
> sure if that is an improvement.

It's not. The goal isn't to fix the warning, it's to fix the problem
the compiler is telling you about - initialising to the wrong value is
just as bad as not being initialised at all.

Attachment: signature.asc
Description: Digital signature