spi-generic: Print an error when trying to use a non-existent bus
...because I just spent hours chasing a refactoring bug that would have been way more obvious with a little more error transparency in here. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I3354ff0370ae79f05e5c37d292ac16d446898606 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57573 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
4c66daaadd
commit
c1b98a43ae
|
@ -123,8 +123,10 @@ int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave)
|
|||
}
|
||||
}
|
||||
|
||||
if (slave->ctrlr == NULL)
|
||||
if (slave->ctrlr == NULL) {
|
||||
printk(BIOS_ERR, "Can't find SPI bus %u\n", bus);
|
||||
return -1;
|
||||
}
|
||||
|
||||
slave->bus = bus;
|
||||
slave->cs = cs;
|
||||
|
|
Loading…
Reference in New Issue