]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 25 Jun 2025 15:22:41 +0000 (10:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:43 +0000 (16:28 +0200)
commit72ff3acf00443119779bb44773c796b26ba37f8c
treee95b86ea7b5cd6e45365f752c94c79d2b049ac21
parentef2f64dff281657851292c712c022777e79775cf
soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()

commit 9f35ab0e53ccbea57bb9cbad8065e0406d516195 upstream.

This function is supposed to return true for valid headers and false for
invalid.  In a couple places it returns -EINVAL instead which means the
invalid headers are counted as true.  Change it to return false.

Fixes: 9f9967fed9d0 ("soc: qcom: mdt_loader: Ensure we don't read past the ELF header")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/db57c01c-bdcc-4a0f-95db-b0f2784ea91f@sabinyo.mountain
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/qcom/mdt_loader.c