linux/drivers
Krzysztof Kozlowski 934debf41f power_supply: twl4030_madc: Check return value of power_supply_register
commit 68c3ed6fa7 upstream.

The return value of power_supply_register() call was not checked and
even on error probe() function returned 0. If registering failed then
during unbind the driver tried to unregister power supply which was not
actually registered.

This could lead to memory corruption because power_supply_unregister()
unconditionally cleans up given power supply.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: da0a00ebc2 ("power: Add twl4030_madc battery driver.")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-05-06 21:59:10 +02:00
..
accessibility printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
acpi cpuidle: ACPI: do not overwrite name and description of C0 2015-04-19 10:11:08 +02:00
amba ARM: 7916/1: amba: Add clk_prepare|unprepare in runtime PM callbacks 2013-12-09 20:25:20 +00:00
ata sata_dwc_460ex: fix resource leak on error path 2015-01-29 17:40:50 -08:00
atm atm: slight optimization of addr compare 2013-12-26 13:31:34 -05:00
auxdisplay framebuffer: Use fb_<level> 2013-10-29 12:53:07 +02:00
base regmap: regcache-rbtree: Fix present bitmap resize 2015-04-13 14:02:59 +02:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
block nbd: fix possible memory leak 2015-04-19 10:11:06 +02:00
bluetooth Bluetooth: Add USB device 04ca:3010 as Atheros AR3012 2015-04-29 10:31:53 +02:00
bus bus: mvebu-mbus: fix support of MBus window 13 2015-01-29 17:40:49 -08:00
cdrom Merge branch 'for-3.14/drivers' of git://git.kernel.dk/linux-block 2014-01-30 11:40:10 -08:00
char tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send 2015-03-26 15:06:54 +01:00
clk clk-gate: fix bit # check in clk_register_gate() 2015-03-18 13:31:34 +01:00
clocksource clocksource: efm32: Fix a NULL pointer dereference 2015-04-13 14:02:59 +02:00
connector net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-06-26 15:15:38 -04:00
cpufreq cpufreq: s3c: remove incorrect __init annotations 2015-03-06 14:43:24 -08:00
cpuidle cpuidle: remove state_count field from struct cpuidle_device 2015-04-19 10:11:08 +02:00
crypto crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:50 -08:00
dca dca: convert to idr_alloc() 2013-02-27 19:10:15 -08:00
devfreq Merge branches 'pm-cpufreq' and 'pm-devfreq' 2014-01-29 11:48:23 +01:00
dio m68k: don't export static inline functions 2009-12-06 11:18:28 +01:00
dma dmaengine: omap-dma: Fix memory leak when terminating running transfer 2015-04-19 10:11:07 +02:00
edac sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel 2015-04-29 10:31:56 +02:00
eisa Revert "EISA: Initialize device before its resources" 2014-01-17 14:57:29 -07:00
extcon extcon: max14577: Properly handle regmap_irq_get_virq error 2014-06-30 20:11:52 -07:00
firewire firewire: cdev: prevent kernel stack leaking into ioctl arguments 2014-11-21 09:23:02 -08:00
firmware efi: Small leak on error in runtime map code 2015-03-18 13:31:33 +01:00
fmc drivers/fmc/fmc-write-eeprom.c: fix decimal permissions 2014-02-25 15:25:43 -08:00
gpio gpio: tps65912: fix wrong container_of arguments 2015-03-06 14:43:31 -08:00
gpu radeon: Do not directly dereference pointers to BIOS area. 2015-04-19 10:11:07 +02:00
hid HID: fixup the conflicting keyboard mappings quirk 2015-03-18 13:31:33 +01:00
hsi hsi: convert bus code to use dev_groups 2013-10-16 18:36:04 -07:00
hv Drivers: hv: vmbus: Fix a race condition when unregistering a device 2015-01-16 06:59:32 -08:00
hwmon hwmon: (ds1621) Update zbits after conversion rate change 2014-10-05 14:52:19 -07:00
hwspinlock A single patch from Vincent extending OMAP's hwspinlock support to OMAP5. 2013-05-07 14:01:27 -07:00
i2c i2c: s3c2410: fix ABBA deadlock by keeping clock prepared 2015-02-05 22:35:49 -08:00
ide drivers: ide: Include appropriate header file in ide-pio-blacklist.c 2014-01-28 23:35:09 -08:00
idle ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
iio iio: imu: Use iio_trigger_get for indio_dev->trig assignment 2015-04-19 10:11:07 +02:00
infiniband IB/mlx4: Saturate RoCE port PMA counters in case of overflow 2015-04-19 10:11:09 +02:00
input HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid 2015-03-18 13:31:33 +01:00
iommu iommu/vt-d: Fix an off-by-one bug in __domain_mapping() 2015-01-16 06:59:31 -08:00
ipack ipack: convert bus code to use dev_groups 2013-10-16 18:40:57 -07:00
irqchip irqchip: gic: Fix core ID calculation when topology is read from DT 2014-07-28 08:06:02 -07:00
isdn isdnloop: several buffer overflows 2014-04-14 06:50:04 -07:00
leds leds: leds-pwm: properly clean up after probe failure 2014-06-07 10:28:18 -07:00
lguest x86, asmlinkage, lguest: Pass in globals into assembler statement 2013-11-07 12:13:05 +10:30
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-01-27 21:11:26 -08:00
mailbox drivers/mailbox/omap: make mbox->irq signed for error handling 2014-01-23 16:36:53 -08:00
md md/raid0: fix bug with chunksize not a power of 2. 2015-05-06 21:59:09 +02:00
media media: s5p-mfc: fix mmap support for 64bit arch 2015-04-19 10:11:09 +02:00
memory memory: mvebu-devbus: fix the conversion of the bus width 2014-06-07 10:28:22 -07:00
memstick drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug 2014-01-23 16:37:04 -08:00
message mptfusion: enable no_write_same for vmware scsi disks 2014-10-30 09:38:20 -07:00
mfd mfd: kempld-core: Fix callback return value check 2015-04-13 14:03:04 +02:00
misc mei: make device disabled on stop unconditionally 2015-03-18 13:31:27 +01:00
mmc mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles 2015-03-06 14:43:26 -08:00
mtd mtd: nand: pxa3xx: Fix PIO FIFO draining 2015-03-26 15:06:56 +01:00
net gianfar: Carefully free skbs in functions called by netpoll. 2015-04-29 10:31:49 +02:00
nfc NFC: microread: Potential overflows in microread_target_discovered() 2014-10-05 14:52:18 -07:00
ntb NTB driver bug fixes to address a missed call to pci_enable_msix, 2013-11-26 11:15:12 -08:00
nubus nubus: Kill nubus_proc_detach_device() 2013-05-04 14:47:26 -04:00
of of/irq: Fix of_irq_parse_one() returned error codes 2015-04-13 14:03:01 +02:00
oprofile oprofile: get rid of pointless forward declarations of struct super_block 2013-09-03 22:52:48 -04:00
parisc PCI changes for the v3.12 merge window: 2013-09-03 16:24:35 -07:00
parport parport: fix menu breakage 2014-07-31 12:52:56 -07:00
pci PCI/AER: Avoid info leak in __print_tlp_header() 2015-04-19 10:11:05 +02:00
pcmcia PCI changes for the v3.14 merge window: 2014-01-22 16:39:28 -08:00
phy phy: Find the right match in devm_phy_destroy() 2015-04-13 14:03:01 +02:00
pinctrl pinctrl: Fix two deadlocks 2015-01-29 17:40:48 -08:00
platform compal-laptop: Check return value of power_supply_register 2015-05-06 21:59:10 +02:00
pnp ACPI / PNP: Fix acpi_pnp_match() 2014-08-07 14:52:37 -07:00
power power_supply: twl4030_madc: Check return value of power_supply_register 2015-05-06 21:59:10 +02:00
powercap powercap / RAPL: add support for ValleyView Soc 2013-12-22 01:27:51 +01:00
pps drivers/pps/clients/pps-gpio.c: remove redundant of_match_ptr 2013-11-13 12:09:35 +09:00
ps3 Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
ptp ptp_pch: Add dependency on HAS_IOMEM 2014-01-15 14:51:22 -08:00
pwm pwm: lp3943: Fix potential memory leak during request 2014-02-26 15:45:12 +01:00
rapidio rapidio/tsi721_dma: fix failure to obtain transaction descriptor 2014-08-07 14:52:37 -07:00
regulator regulator: core: Fix enable GPIO reference counting 2015-03-26 15:06:56 +01:00
remoteproc virtio_ring: change host notification API 2013-10-29 11:28:11 +10:30
reset reset: Add Allwinner SoCs Reset Controller Driver 2013-11-22 21:20:36 +01:00
rpmsg A small pull request consisting of: 2013-05-07 14:02:00 -07:00
rtc drivers/rtc/rtc-isl12057.c: fix masking of register values 2015-01-16 06:59:29 -08:00
s390 crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:50 -08:00
sbus bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000 2014-08-14 09:38:26 +08:00
scsi be2iscsi: Fix kernel panic when device initialization fails 2015-04-19 10:11:09 +02:00
sfi SFI / ACPI: Fix warnings reported during builds with W=1 2013-12-07 01:24:33 +01:00
sh Merge branch 'pm-assorted' 2013-06-28 13:01:40 +02:00
sn Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
spi spi: spidev: fix possible arithmetic overflow for multi-transfer message 2015-05-06 21:59:10 +02:00
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
staging vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:31:55 +02:00
target iscsi target: fix oops when adding reject pdu 2015-04-19 10:11:09 +02:00
tc include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
thermal tick/powerclamp: Remove tick_nohz_idle abuse 2015-01-27 08:18:55 -08:00
tty n_tty: Fix read buffer overwrite when no newline 2015-04-19 10:11:08 +02:00
uio uio: fix devm_request_irq usage 2013-12-20 08:49:17 -08:00
usb cdc-wdm: fix endianness bug in debug statements 2015-05-06 21:59:09 +02:00
uwb uwb: init beacon cache entry before registering uwb device 2014-10-05 14:52:14 -07:00
vfio vfio-pci: Fix the check on pci device type in vfio_pci_probe() 2015-01-27 08:18:56 -08:00
vhost vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion 2015-01-27 08:18:58 -08:00
video video/logo: prevent use of logos after they have been freed 2015-01-27 08:18:55 -08:00
virt drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
virtio virtio_pci: fix virtio spec compliance on restore 2014-11-14 08:59:50 -08:00
vlynq drivers/vlynq/vlynq.c: fix another resource size off by 1 error 2014-01-23 16:36:55 -08:00
vme VME: Correct read/write alignment algorithm 2014-02-07 08:16:14 -08:00
w1 w1: fix w1_send_slave dropping a slave id 2014-05-06 07:59:26 -07:00
watchdog watchdog: kempld-wdt: Use the correct value when configuring the prescaler with the watchdog 2014-07-06 18:57:27 -07:00
xen xen-pciback: limit guest control of command register 2015-03-26 15:06:57 +01:00
zorro zorro/UAPI: Use proper types (endianness/size) in <linux/zorro.h> 2013-11-26 11:09:09 +01:00
Kconfig ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
Makefile ARM: Rename ARCH_SHMOBILE to ARCH_SHMOBILE_LEGACY 2013-12-10 16:52:18 +09:00