https://github.com/torvalds/linux
Revision f65e9eacfad60cd05d1bac7defb6ff6b50dcfb5b authored by Arnd Bergmann on 25 January 2013, 14:14:26 UTC, committed by Samuel Ortiz on 27 January 2013, 01:18:01 UTC
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 <peter.ujfalusi@ti.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: "Kristo, Tero" <t-kristo@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
1 parent 0a8c290
History
Tip revision: f65e9eacfad60cd05d1bac7defb6ff6b50dcfb5b authored by Arnd Bergmann on 25 January 2013, 14:14:26 UTC
mfd: twl4030: Don't warn about uninitialized return code
Tip revision: f65e9ea
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.8 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 234.2 KB
Makefile -rw-r--r-- 46.9 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top