mtd: amd76xrom: fix oops at boot when resources are not available
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Mar 11 10:59:01 EST 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=82013d988fc03a1b908b2b0360a1e34f6152fda6
Commit: 82013d988fc03a1b908b2b0360a1e34f6152fda6
Parent: ecf3fde07c8dcb92a1bf3fbdfe70905d85cd00e1
Author: Stanislaw Gruszka <stf_xl at wp.pl>
AuthorDate: Sat Jan 8 15:24:37 2011 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Mar 11 14:19:09 2011 +0000
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 <russ at ashlandhome.net>
Signed-off-by: Stanislaw Gruszka <stf_xl at wp.pl>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
Cc: stable at kernel.org
---
drivers/mtd/maps/amd76xrom.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index 77d64ce..92de7e3 100644
--- a/drivers/mtd/maps/amd76xrom.c
+++ b/drivers/mtd/maps/amd76xrom.c
@@ -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;
}
More information about the linux-mtd-cvs
mailing list