Thread (38 messages) 38 messages, 9 authors, 2013-04-18

[PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

From: Samuel Ortiz <hidden>
Date: 2013-01-27 00:42:04
Also in: lkml

Possibly related (same subject, not in this thread)

Hi Arnd,

On Fri, Jan 25, 2013 at 10:44:08PM +0000, Arnd Bergmann wrote:
If the twl4030_write_script function gets called with
a zero length argument, its return value does not
get set. We know that all scripts have a nonzero
length, but returning an error in case they ever
do is probably appropriate.

Without this patch, building omap2plus_defconfig results in:

drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in this function

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Peter Ujfalusi <redacted>
Reviewed-by: Amit Kucheria <redacted>
Cc: Samuel Ortiz <redacted>
Cc: Kevin Hilman <redacted>
Cc: "Kristo, Tero" <redacted>
---
 drivers/mfd/twl4030-power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to my for-linus branch, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help