Commit 646a9e9a authored by Federico Vaga's avatar Federico Vaga

sw:drv: improve error reporting on I2C failure

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 48ecd977
...@@ -653,8 +653,12 @@ static int spec_fmc_init(struct spec_fpga *spec_fpga) ...@@ -653,8 +653,12 @@ static int spec_fmc_init(struct spec_fpga *spec_fpga)
int err; int err;
spec_fpga->slot_info.i2c_bus_nr = spec_i2c_get_bus(spec_fpga); spec_fpga->slot_info.i2c_bus_nr = spec_i2c_get_bus(spec_fpga);
if (spec_fpga->slot_info.i2c_bus_nr <= 0) if (spec_fpga->slot_info.i2c_bus_nr <= 0) {
dev_err(spec_fpga->dev.parent,
"Invalid I2C bus number %d\n",
spec_fpga->slot_info.i2c_bus_nr);
return -ENODEV; return -ENODEV;
}
spec_fpga->slot_info.ga = 0; spec_fpga->slot_info.ga = 0;
spec_fpga->slot_info.lun = 1; spec_fpga->slot_info.lun = 1;
......
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