提交 82013d98 编写于 作者: S Stanislaw Gruszka 提交者: David Woodhouse

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: NRussell Whitaker <russ@ashlandhome.net>
Signed-off-by: NStanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
上级 ecf3fde0
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册