mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ASoC: codecs: rk3308_codec check version early
Fix error case for rk3308 codec driver before support rk3308bs. [ 0.469254] Unable to handle kernel paging request at virtual address ffffffc1108ef861 [ 0.469970] Mem abort info: [ 0.470223] ESR = 0x96000045 [ 0.470500] EC = 0x25: DABT (current EL), IL = 32 bits [ 0.470966] SET = 0, FnV = 0 [ 0.471240] EA = 0, S1PTW = 0 [ 0.471524] Data abort info: [ 0.471788] ISV = 0, ISS = 0x00000045 [ 0.472137] CM = 0, WnR = 1 [ 0.472404] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000000a8f000 [ 0.472999] [ffffffc1108ef861] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 0.473780] Internal error: Oops: 96000045 [#1] PREEMPT SMP [ 0.474279] Modules linked in: [ 0.474563] CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.10.66 #244 [ 0.475137] Hardware name: Rockchip RK3308B-S evb analog mic v11 board (DT) [ 0.475772] Workqueue: events_unbound deferred_probe_work_func [ 0.476300] pstate: 00000085 (nzcv daIf -PAN -UAO -TCO BTYPE=--) [ 0.476839] pc : queued_spin_lock_slowpath+0x164/0x374 [ 0.477301] lr : _raw_spin_lock_irqsave+0x94/0xa4 [ 0.477714] sp : ffffffc010b33c00 [ 0.478010] x29: ffffffc010b33c00 x28: ffffffc010906000 [ 0.478484] x27: 0000000000000402 x26: ffffff8001008020 [ 0.478957] x25: 000000000100500d x24: 0000000000000002 [ 0.479430] x23: ffffff8001076d10 x22: 0000000000000000 [ 0.479903] x21: ffffffc010a1e108 x20: 0000000000000000 [ 0.480376] x19: 0000000000000000 x18: 0000008000000000 [ 0.480849] x17: 000000000000002c x16: 0000000000000000 [ 0.481322] x15: ffffffc010908a70 x14: 0000000100000001 [ 0.481794] x13: ffffffc0108ef860 x12: 0000000000080000 [ 0.482267] x11: ffffff801fe6b848 x10: ffffff801fe6b840 [ 0.482740] x9 : ffffffc0108ef840 x8 : ffffff80013e50c8 [ 0.483212] x7 : ffffffc010813000 x6 : ffffffc010a99000 [ 0.483683] x5 : 000000008020001d x4 : 0000000000000000 [ 0.484156] x3 : 000000000000000a x2 : ffffffc010356c3c [ 0.484629] x1 : 00000000013e50c8 x0 : ffffff80013e50c8 [ 0.485102] Call trace: [ 0.485328] queued_spin_lock_slowpath+0x164/0x374 [ 0.485756] klist_next+0x2c/0x104 [ 0.486070] device_for_each_child+0x44/0xac [ 0.486456] device_reorder_to_tail+0x48/0x8c [ 0.486851] device_for_each_child+0x58/0xac [ 0.487235] device_reorder_to_tail+0x48/0x8c [ 0.487629] device_pm_move_to_tail+0x34/0x68 [ 0.488024] deferred_probe_work_func+0x80/0xc4 [ 0.488432] process_one_work+0x178/0x2f0 [ 0.488794] worker_thread+0x268/0x3dc [ 0.489136] kthread+0x124/0x2a8 [ 0.489437] ret_from_fork+0x10/0x30 Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Change-Id: I77acd84a7aed7e8a3cff9ddee8688d5e55b15278
This commit is contained in:
@@ -4834,6 +4834,10 @@ static int rk3308_platform_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(rk3308->grf);
|
||||
}
|
||||
|
||||
ret = rk3308_codec_get_version(rk3308);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(&pdev->dev, ret, "Failed to get acodec version\n");
|
||||
|
||||
ret = rk3308_codec_sysfs_init(pdev, rk3308);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Sysfs init failed\n");
|
||||
@@ -4994,13 +4998,6 @@ static int rk3308_platform_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = rk3308_codec_get_version(rk3308);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Failed to get acodec version: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base)) {
|
||||
|
||||
Reference in New Issue
Block a user