diff options
Diffstat (limited to 'drivers/misc/lattice-ecp3-config.c')
-rw-r--r-- | drivers/misc/lattice-ecp3-config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/lattice-ecp3-config.c b/drivers/misc/lattice-ecp3-config.c index 7ffdb589841e..c544f1f50f52 100644 --- a/drivers/misc/lattice-ecp3-config.c +++ b/drivers/misc/lattice-ecp3-config.c @@ -79,6 +79,11 @@ static void firmware_load(const struct firmware *fw, void *context) u32 jedec_id; u32 status; + if (fw == NULL) { + dev_err(&spi->dev, "Cannot load firmware, aborting\n"); + return; + } + if (fw->size == 0) { dev_err(&spi->dev, "Error: Firmware size is 0!\n"); return; @@ -242,3 +247,4 @@ module_spi_driver(lattice_ecp3_driver); MODULE_AUTHOR("Stefan Roese <sr@denx.de>"); MODULE_DESCRIPTION("Lattice ECP3 FPGA configuration via SPI"); MODULE_LICENSE("GPL"); +MODULE_FIRMWARE(FIRMWARE_NAME); |