Message ID | 20230621162005.473049-2-ben.dooks@codethink.co.uk (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | updates for i3c error printing | expand |
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 08aeb69a7800..559fc2781a81 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2094,8 +2094,10 @@ static int of_i3c_master_add_dev(struct i3c_master_controller *master, return -EINVAL; ret = of_property_read_u32_array(node, "reg", reg, ARRAY_SIZE(reg)); - if (ret) + if (ret) { + dev_err(&master->dev, "%pOF: invalid reg property", node); return ret; + } /* * The manufacturer ID can't be 0. If reg[1] == 0 that means we're
When adding i3c devices via fdt, it is useful to get an error if the reg node is wrong (say, you thought it was an i2c device and only needed one value here) and have the error show the OF node which was the cause of the problem (in case of many devices in the system), Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> --- drivers/i3c/master.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)