diff options
Diffstat (limited to 'cmd/spi.c')
-rw-r--r-- | cmd/spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -51,6 +51,8 @@ static int do_spi_xfer(int bus, int cs) snprintf(name, sizeof(name), "generic_%d:%d", bus, cs); str = strdup(name); + if (!str) + return -ENOMEM; ret = spi_get_bus_and_cs(bus, cs, 1000000, mode, "spi_generic_drv", str, &dev, &slave); if (ret) |