]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: generic: Revert to old error handling in bgpio_map
authorGuenter Roeck <linux@roeck-us.net>
Wed, 21 Oct 2015 07:12:00 +0000 (00:12 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 27 Oct 2015 10:26:31 +0000 (11:26 +0100)
commitda673e3691c800c535d1140e4f616500984c4056
tree0618610fdc7826c6302247e17d098f83ccd973e8
parent36b7978d3f845c475f9754ac8ef34cdc87f5a247
gpio: generic: Revert to old error handling in bgpio_map

Returning an error instead of NULL in bgpio_map if
platform_get_resource_byname does not find a resource was introduced with
commit fc5f3399c2e4 ("gpio: generic: improve error handling in bgpio_map").
This results in several qemu runtime failures with default and non-default
configurations, if attempts are made to boot from mmcblk0. Examples for
failures with multi_v7_defconfig are

Machine: vexpress-a9 dtb: vexpress-v2p-ca9
Machine: vexpress-a15 dtb: vexpress-v2p-ca15-tc1

Crash:

VFS: Cannot open root device "mmcblk0" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Looking into the code, always returning an error if bgpio_map fails
does not appear to make much sense, since the code in bgpio_setup_io
specifically supports some of the resources to be NULL.

Fixes: fc5f3399c2e4 ("gpio: generic: improve error handling in bgpio_map")
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-generic.c