tmp_suning_uos_patched/drivers
Krzysztof Kozlowski c94a3d4032 power_supply: 88pm860x_charger: Fix possible NULL pointer dereference and use of initialized variable
Do not put reference to power supply in early exit paths of
pm860x_done_handler() because:
1. it is not yet initialized,
2. it is NULL.

This fixes possible NULL pointer dereference and following build
warning:
drivers/power/88pm860x_charger.c: In function ‘pm860x_done_handler’:
drivers/power/88pm860x_charger.c:516:18: warning: ‘psy’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Additionally this puts the power supply reference before unlocking
mutex. This actually is not needed (there is no race here) but has
logical sense and makes the exit paths cleaner.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-03-20 12:46:04 +01:00
..
accessibility
acpi power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
coresight
cpufreq
cpuidle
crypto
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
gpio
gpu
hid power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
hsi
hv
hwmon
hwspinlock
i2c
ide
idle
iio iio: Add support for DA9150 GPADC 2015-02-25 21:05:26 +01:00
infiniband
input
iommu
ipack
irqchip
isdn
leds
lguest
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd mfd: ab8500: Decrement the power supply's device reference counter 2015-03-13 23:15:54 +01:00
misc
mmc
mtd
net
nfc
ntb
nubus
of
oprofile
parisc
parport
pci
pcmcia
phy
pinctrl
platform power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
pnp
power power_supply: 88pm860x_charger: Fix possible NULL pointer dereference and use of initialized variable 2015-03-20 12:46:04 +01:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
sn
soc
spi
spmi
ssb
staging power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
target
tc
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile