Skip to content

Commit

Permalink
mtd: amd76xrom: fix oops at boot when resources are not available
Browse files Browse the repository at this point in the history
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@ashlandhome.net>
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
  • Loading branch information
Stanislaw Gruszka authored and David Woodhouse committed Mar 11, 2011
1 parent ecf3fde commit 82013d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/maps/amd76xrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 82013d9

Please sign in to comment.