linux/drivers/power
Dmitry Eremin-Solenikov ce992369cf power_supply: fix oops in collie_battery driver
Fix an oops happening due to typo in 297d716f62
[power_supply: Change ownership from driver to core].

Unable to handle kernel NULL pointer dereference at virtual address 00000050
pgd = c0004000
[00000050] *pgd=00000000
Internal error: Oops: 17 [#1] ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.1.0-rc1+ #35
Hardware name: Sharp-Collie
task: c381a720 ti: c381e000 task.ti: c381e000
PC is at collie_bat_get_property+0x10/0x258
LR is at collie_bat_get_property+0x10/0x258
pc : [<c0235d28>]    lr : [<c0235d28>]    psr: 20000013
sp : c381fd60  ip : 00000001  fp : 00000000
r10: c37b84c0  r9 : c068c9b8  r8 : c37b84a0
r7 : c37b84c0  r6 : c381fd84  r5 : 00000000  r4 : 00000000
r3 : c0369380  r2 : c381fd84  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0000717f  Table: c3784000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc381e190)
Stack: (0xc381fd60 to 0xc3820000)
fd60: c0369380 00000000 c37c0000 c068c9b8 c37b84c0 c0234380 00000000 c0234bc0
fd80: c042fcec c37b84a0 c0357c64 00000000 c37b84c0 c37c0000 c37b84a0 c0234e98
fda0: c37be020 00000000 ff0a0004 c37b84c8 c37be020 c37b84c0 c042fcec c383dbc0
fdc0: c0364060 00000000 00000000 c01be6a8 00000000 c015b220 c37b84c8 c381fdf0
fde0: c37b84c8 c37b84c8 c37b84c8 c37be020 c041e278 c015b478 c04a45b4 c0045290
fe00: c381a720 c0345d50 00000001 c37bf020 c0e511d8 c00453c0 c0688058 c37b84c8
fe20: 00000000 c37b84c0 c37780c0 c0e511d8 c38e2f60 c0e52d24 c04a45b4 c01be134
fe40: c37b8550 c37b8550 00000000 c0347a8c c37b84a0 00000000 c37b84c0 c0369380
fe60: c37780c0 00000001 00000061 c02347a0 00000001 c0e52e6c c068d144 c37b77a0
fe80: 00000000 c068d164 00000000 c0235b3c 00000000 c067fbb4 00000000 c068d1e4
fea0: 00000000 00000000 00000000 00000000 00000000 00000000 c37b77a0 c068d144
fec0: c3778020 c06953c0 c049de68 c01d5f54 c0688800 c3778020 c068d144 c0688700
fee0: c06953c0 c01d6000 c0675b80 c0675b80 c37b77a0 c0009624 c381a720 c000d8dc
ff00: 00000001 c381ff54 c048a500 c00453c0 c00095a0 20000153 ffffffff c000d8dc
ff20: c049cbd0 00000001 c04aa064 00000007 c04a9fb0 00000006 c06953c0 c06953c0
ff40: c048a590 c04a45c0 c04a9ffc 00000006 c06953c0 c06953c0 c048a590 c04a45c0
ff60: 00000061 c048adf8 00000006 00000006 c048a590 c0036450 00000001 00000000
ff80: c00363ec 00000000 c033ee7c 00000000 00000000 00000000 00000000 00000000
ffa0: 00000000 c033ee84 00000000 c000a3c8 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c0235d28>] (collie_bat_get_property) from [<c0234380>] (power_supply_get_property+0x1c/0x28)
[<c0234380>] (power_supply_get_property) from [<c0234bc0>] (power_supply_show_property+0x50/0x1dc)
[<c0234bc0>] (power_supply_show_property) from [<c0234e98>] (power_supply_uevent+0x9c/0x1cc)
[<c0234e98>] (power_supply_uevent) from [<c01be6a8>] (dev_uevent+0xb4/0x1d0)
[<c01be6a8>] (dev_uevent) from [<c015b478>] (kobject_uevent_env+0x1cc/0x4f8)
[<c015b478>] (kobject_uevent_env) from [<c01be134>] (device_add+0x374/0x524)
[<c01be134>] (device_add) from [<c02347a0>] (__power_supply_register+0x120/0x180)
[<c02347a0>] (__power_supply_register) from [<c0235b3c>] (collie_bat_probe+0xe8/0x1b4)
[<c0235b3c>] (collie_bat_probe) from [<c01d5f54>] (ucb1x00_add_dev+0x30/0x88)
[<c01d5f54>] (ucb1x00_add_dev) from [<c01d6000>] (ucb1x00_register_driver+0x54/0x78)
[<c01d6000>] (ucb1x00_register_driver) from [<c0009624>] (do_one_initcall+0x84/0x1f4)
[<c0009624>] (do_one_initcall) from [<c048adf8>] (kernel_init_freeable+0xf8/0x1b4)
[<c048adf8>] (kernel_init_freeable) from [<c033ee84>] (kernel_init+0x8/0xec)
[<c033ee84>] (kernel_init) from [<c000a3c8>] (ret_from_fork+0x14/0x2c)
Code: e92d40f8 e1a05001 e1a06002 ebfff9bc (e5903050)
---[ end trace 447ee06b251d66b2 ]---

Fixes: 297d716f62 ("power_supply: Change ownership from driver to core")
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-04-30 17:39:40 +02:00
..
avs PM / AVS: rockchip-io: add driver handling Rockchip io domains 2014-09-25 09:57:23 -07:00
reset power/reset: at91: fix return value check in at91_reset_platform_probe() 2015-04-30 17:33:52 +02:00
88pm860x_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
88pm860x_charger.c power_supply: 88pm860x_charger: Fix possible NULL pointer dereference and use of initialized variable 2015-03-20 12:46:04 +01:00
ab8500_bmdata.c ab8500_bmdata: Export abx500_res_to_temp tables for hwmon 2013-04-16 17:38:10 -07:00
ab8500_btemp.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ab8500_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ab8500_fg.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
abx500_chargalg.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
apm_power.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
axp288_fuel_gauge.c axp288_fuel_gauge: Add original author details 2015-04-30 17:19:55 +02:00
bq27x00_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
bq2415x_charger.c power_supply: bq2415x_charger: Decrement the power supply's device reference counter 2015-03-13 23:15:54 +01:00
bq24190_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
bq24735-charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
charger-manager.c power_supply: charger-manager: Fix dereferencing of ERR_PTR 2015-03-24 13:40:14 +01:00
collie_battery.c power_supply: fix oops in collie_battery driver 2015-04-30 17:39:40 +02:00
da9030_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
da9052-battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
da9150-charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ds2760_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ds2780_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ds2781_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ds2782_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
generic-adc-battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
goldfish_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
gpio-charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
intel_mid_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ipaq_micro_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
isp1704_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
jz4740-battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
Kconfig X-Power AXP288 PMIC Fuel Gauge Driver 2015-03-07 20:08:58 +01:00
lp8727_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
lp8788-charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
ltc2941-battery-gauge.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
Makefile X-Power AXP288 PMIC Fuel Gauge Driver 2015-03-07 20:08:58 +01:00
max8903_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
max8925_power.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
max8997_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
max8998_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
max14577_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
max17040_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
max17042_battery.c power: max17042_battery: add missed blank 2015-04-06 17:46:46 +02:00
max77693_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
olpc_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
pcf50633-charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
pda_power.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
pm2301_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
pm2301_charger.h power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
pmu_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
power_supply_core.c power_supply: Increment power supply use counter when obtaining references 2015-03-13 23:15:52 +01:00
power_supply_leds.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
power_supply_sysfs.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
power_supply.h device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
rt5033_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
rx51_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
s3c_adc_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
sbs-battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
smb347-charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
test_power.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
tosa_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
tps65090-charger.c power: constify of_device_id array 2015-03-20 13:23:06 +01:00
twl4030_charger.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
twl4030_madc_battery.c power: twl4030_madc_battery: Add missing MODULE_ALIAS 2015-04-06 19:39:57 +02:00
wm97xx_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
wm831x_backup.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
wm831x_power.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
wm8350_power.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
z2_battery.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00