diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/raw/atmel/nand-controller.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index 9873d11254..950e626f91 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -1601,10 +1601,13 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc, nand->cs[i].rb.type = ATMEL_NAND_NATIVE_RB; nand->cs[i].rb.id = val; } else { - gpio_request_by_name_nodev(np, "rb-gpios", 0, - &nand->cs[i].rb.gpio, - GPIOD_IS_IN); - nand->cs[i].rb.type = ATMEL_NAND_GPIO_RB; + ret = gpio_request_by_name_nodev(np, "rb-gpios", 0, + &nand->cs[i].rb.gpio, + GPIOD_IS_IN); + if (ret && ret != -ENOENT) + dev_err(nc->dev, "Failed to get R/B gpio (err = %d)\n", ret); + if (!ret) + nand->cs[i].rb.type = ATMEL_NAND_GPIO_RB; } gpio_request_by_name_nodev(np, "cs-gpios", 0, |