mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
mmc: rk29: fix NULL dereference in rk29_sdmmc_set_frq
fix this bug: Unable to handle kernel NULL pointer dereference at virtual address 000000d0 pgd = c0404000 [000000d0] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT CPU: 0 Not tainted (3.0.8+ #5) PC is at rk29_sdmmc_set_frq+0x28/0x6c LR is at rk29_sdmmc_set_frq+0x10/0x6c pc : [<c06c664c>] lr : [<c06c6634>] psr: 80000093 sp : d53c9e28 ip : ffff8b5d fp : c0aae32c r10: 00000000 r9 : d53a24d0 r8 : ffff8b5c r7 : 60000013 r6 : 00002041 r5 : d53c9ed8 r4 : d53bc280 r3 : 00000000 r2 : 00000000 r1 : d53c9ed8 r0 : d53bc000 [<c06c664c>] (rk29_sdmmc_set_frq+0x28/0x6c) from [<c06c66e8>] (rk29_sdmmc_start_command+0x58/0x120) [<c06c66e8>] (rk29_sdmmc_start_command+0x58/0x120) from [<c06c6d40>] (rk29_sdmmc_request+0x590/0x704) [<c06c6d40>] (rk29_sdmmc_request+0x590/0x704) from [<c06bac2c>] (mmc_wait_for_req+0x110/0x214) [<c06bac2c>] (mmc_wait_for_req+0x110/0x214) from [<c06bad94>] (mmc_wait_for_cmd+0x64/0x74) [<c06bad94>] (mmc_wait_for_cmd+0x64/0x74) from [<c06bd71c>] (mmc_send_op_cond+0x74/0xe0) [<c06bd71c>] (mmc_send_op_cond+0x74/0xe0) from [<c06bca78>] (mmc_attach_mmc+0x40/0x1f0) [<c06bca78>] (mmc_attach_mmc+0x40/0x1f0) from [<c06baa98>] (mmc_rescan+0x344/0x3c8) [<c06baa98>] (mmc_rescan+0x344/0x3c8) from [<c04680c4>] (process_one_work+0x258/0x3ac) [<c04680c4>] (process_one_work+0x258/0x3ac) from [<c046aa74>] (worker_thread+0x238/0x440) [<c046aa74>] (worker_thread+0x238/0x440) from [<c046e4c0>] (kthread+0x80/0x88) [<c046e4c0>] (kthread+0x80/0x88) from [<c04331d0>] (kernel_thread_exit+0x0/0x8)
This commit is contained in:
@@ -696,7 +696,7 @@ void rk29_sdmmc_set_frq(struct rk29_sdmmc *host)
|
||||
card = (struct mmc_card *)mmchost->card;
|
||||
ios = ( struct mmc_ios *)&mmchost->ios;
|
||||
|
||||
if(!card && !ios)
|
||||
if(!card || !ios)
|
||||
return;
|
||||
|
||||
if(MMC_POWER_ON == ios->power_mode)
|
||||
|
||||
Reference in New Issue
Block a user