Skip to content

Commit cb7e2ec

Browse files
MrVanJassi Brar
authored andcommitted
mailbox: Propagate correct error return value
In case of_property_match_string fails, it makes more sense to return its error value to caller, not force the value to ERR_PTR(-EINVAL). Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent dddbd23 commit cb7e2ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mailbox/mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
458458
if (index < 0) {
459459
dev_err(cl->dev, "%s() could not locate channel named \"%s\"\n",
460460
__func__, name);
461-
return ERR_PTR(-EINVAL);
461+
return ERR_PTR(index);
462462
}
463463
return mbox_request_channel(cl, index);
464464
}

0 commit comments

Comments
 (0)