[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140807095517.GD17528@sirena.org.uk>
Date: Thu, 7 Aug 2014 10:55:17 +0100
From: Mark Brown <broonie@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Nick Krause <xerofoiify@...il.com>,
"open list:SPI SUBSYSTEM" <linux-spi@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: Initialize variable to prevent uninitialized warning
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.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists