[PATCH v6 1/9] gpio: qcom_pmic: fix silent dev_read_addr downcast

Simon Glass sjg at chromium.org
Wed Dec 6 04:54:00 CET 2023


On Tue, 5 Dec 2023 at 06:47, Caleb Connolly <caleb.connolly at linaro.org> wrote:
>
> priv->pid is uint32_t, but dev_read_addr() returns a uint64_t on arm64,
> with the upper bits being used for error codes. Do error checking before
> downcasting to u32 to prevent errors being silently ignored.
>
> Reviewed-by: Sumit Garg <sumit.garg at linaro.org>
> Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
> Tested-by: Sumit Garg <sumit.garg at linaro.org>
> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> ---
>  drivers/gpio/qcom_pmic_gpio.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list