]> 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:37:54 +0000 (14:37 +0200)
commit84a2fccac8c82c879085396fdc0996d0f3d67adc
tree3be17fd487dc54133fb8f06833d0833b83e41569
parent236bad68c007f23068a0b52f5dba12061cfd90b8
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