]> git.baikalelectronics.ru Git - kernel.git/commit
mtd/maps/physmap: catch failure to register MTD_PHYSMAP_COMPAT device
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 2 Apr 2010 22:46:30 +0000 (17:46 -0500)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 20 Apr 2010 07:53:52 +0000 (08:53 +0100)
commitb6356644010d659a83432e0fb7c6e7ef0f34ab83
tree2d867897b6c6c88e912b60ca98ff06aaf98f1642
parent2006522b26975591d176d5a88eea4643284569d2
mtd/maps/physmap: catch failure to register MTD_PHYSMAP_COMPAT device

If the default Kconfig values are used with MTD_PHYSMAP_COMPAT you end
up with a resource where end < start.  This causes __request_resource to
return a conflict which then returns an -EBUSY error code.  The current
physmap.c code just assumes that the platfom_device_register will always
succeed.

Catch this failure during the physmap_init and propogate the error.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/maps/physmap.c