mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mtd: amd76xrom: fix oops at boot when resources are not available
For some unknown reasons resources needed by amd76xrom driver can be unavailable. And instead of returning an error, the driver keeps going and crash the kernel. This patch fixes the problem by making the driver return -EBUSY if the resources are not available. Commit messages tweaked by Artem. Reported-by: Russell Whitaker <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Cc: [email protected]
This commit is contained in:
parent
ecf3fde07c
commit
82013d988f
1 changed files with 1 additions and 0 deletions
|
|
@ -151,6 +151,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
|
|||
printk(KERN_ERR MOD_NAME
|
||||
" %s(): Unable to register resource %pR - kernel bug?\n",
|
||||
__func__, &window->rsrc);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue