Commit cb7e2ec3 authored by Peng Fan's avatar Peng Fan Committed by Jassi Brar
Browse files

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: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
parent dddbd233
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
	if (index < 0) {
		dev_err(cl->dev, "%s() could not locate channel named \"%s\"\n",
			__func__, name);
		return ERR_PTR(-EINVAL);
		return ERR_PTR(index);
	}
	return mbox_request_channel(cl, index);
}