]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mailbox: use error ret code of of_parse_phandle_with_args()
authorTudor Ambarus <tudor.ambarus@linaro.org>
Mon, 24 Feb 2025 08:27:13 +0000 (08:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:41:54 +0000 (14:41 +0200)
commit09096ead92f39292267ab10113e4c7df4b9ed3f7
tree39132db24a0067490df879906cf078c14a8d652c
parent5641f6b3a4cd5672fbc94f7899d51bb21eb87da4
mailbox: use error ret code of of_parse_phandle_with_args()

[ Upstream commit 24fdd5074b205cfb0ef4cd0751a2d03031455929 ]

In case of error, of_parse_phandle_with_args() returns -EINVAL when the
passed index is negative, or -ENOENT when the index is for an empty
phandle. The mailbox core overwrote the error return code with a less
precise -ENODEV. Use the error returned code from
of_parse_phandle_with_args().

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/mailbox.c