mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mfd: db8500-prcmu: Check return of devm_ioremap for error
Error check around return value of devm_ioremap is missing. Add the same to avoid NULL pointer dereference. Signed-off-by: Pramod Gurav <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
1b9b46d05f
commit
51a7e02bb6
1 changed files with 5 additions and 0 deletions
|
|
@ -3167,6 +3167,11 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
|
|||
}
|
||||
tcdm_base = devm_ioremap(&pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
if (!tcdm_base) {
|
||||
dev_err(&pdev->dev,
|
||||
"failed to ioremap prcmu-tcdm register memory\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/* Clean up the mailbox interrupts after pre-kernel code. */
|
||||
writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);
|
||||
|
|
|
|||
Loading…
Reference in a new issue