Commit a92a2d46 authored by Rui Miguel Silva's avatar Rui Miguel Silva Committed by Greg Kroah-Hartman

greybus: spi: validate spi master register

Check for error in registering spi master, even though the current code
will fail a little more ahead when trying to register devices in the
master.
Signed-off-by: default avatarRui Miguel Silva <rui.silva@linaro.org>
Reported-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 5fbd1a0b
......@@ -360,6 +360,8 @@ static int gb_spi_connection_init(struct gb_connection *connection)
master->transfer_one_message = gb_spi_transfer_one_message;
ret = spi_register_master(master);
if (ret < 0)
goto out_put_master;
/* now, fetch the devices configuration */
for (i = 0; i < spi->num_chipselect; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment