Skip to contentSkip to conversation

i3c: master; add error print for invalid node

PATCH New Ben Dooks 1 participant 1 message Jul 8, 2022 I3C

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 i3c: master; add error print for invalid node

Show an error if the OF code in the i3c master setup failed to read the register, so that if an incorrect node is supplied there is an error print to make it clear what the problem is

---
 drivers/i3c/master.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/i3c/master.c +3 -1
index 7850287dfe7a..271d687d0d07 100644
@@ -2082,8 +2082,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, "i3c: invalid reg for %pOF\n", node);
 		return ret;
+	}
 
 	/*
 	 * The manufacturer ID can't be 0. If reg[1] == 0 that means we're
Signature · 1 line
2.35.1