]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mfd: Fix 88pm860x uninitialized variable and clean up
authorDan Carpenter <error27@gmail.com>
Wed, 26 May 2010 22:54:09 +0000 (00:54 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 12 Aug 2010 09:27:18 +0000 (11:27 +0200)
commiteb6e8ddf06ff0d6b6548ca0b95a4edfeb2aaadd0
tree4763ef7bf41e50e3d443fefc3a58faa3ee0df31a
parentd281b80c46da8bae806c4ef5682187f07e35389d
mfd: Fix 88pm860x uninitialized variable and clean up

The original code had a compile warning:
drivers/mfd/88pm860x-core.c:431: warning: ‘ret’ may be used
uninitialized in this function
It seems like the warning is valid if either pdata or pdata->touch is
NULL.

This patch checks pdata and pdata->touch at the beginning of the
function.  That means everything can be pulled in one indent level.
Now all the statements fit within the 80 character limit.

Also at that point the "use_gpadc" variable isn't needed and removing
it simplifies the logic.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Haojian Zhuang <hzhuang1@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/88pm860x-core.c