diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c index e2f72446d5..d858c860f6 100644 --- a/drivers/clk/at91/sam9x60.c +++ b/drivers/clk/at91/sam9x60.c @@ -429,8 +429,8 @@ static int sam9x60_clk_probe(struct udevice *dev) if (!base) return -EINVAL; - memset(muxallocs, 0, ARRAY_SIZE(muxallocs)); - memset(clkmuxallocs, 0, ARRAY_SIZE(clkmuxallocs)); + memset(muxallocs, 0, sizeof(muxallocs)); + memset(clkmuxallocs, 0, sizeof(clkmuxallocs)); ret = clk_get_by_index(dev, 0, &clk); if (ret) diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c index 3abd220803..3e62fb1f58 100644 --- a/drivers/clk/at91/sama7g5.c +++ b/drivers/clk/at91/sama7g5.c @@ -1115,8 +1115,8 @@ static int sama7g5_clk_probe(struct udevice *dev) if (IS_ERR(base)) return PTR_ERR(base); - memset(muxallocs, 0, ARRAY_SIZE(muxallocs)); - memset(clkmuxallocs, 0, ARRAY_SIZE(clkmuxallocs)); + memset(muxallocs, 0, sizeof(muxallocs)); + memset(clkmuxallocs, 0, sizeof(clkmuxallocs)); ret = clk_get_by_index(dev, 0, &clk); if (ret) 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,