[PATCH] drivers: soc: xilinx: check return status of get_api_version()
Greg KH
gregkh at linuxfoundation.org
Wed Apr 24 14:34:22 PDT 2024
On Tue, Apr 23, 2024 at 11:31:18PM -0700, Jay Buddhabhatti wrote:
> Check return status of pm_get_api_version and return error in case of failure to
> avoid checking uninitialized pm_api_version variable from stack.
>
> The issue is also reported by smatch on x86 as "warning: 'pm_api_version' is
> used uninitialized".
>
> Fixes: b9b3a8be28b3 ("firmware: xilinx: Remove eemi ops for get_api_version")
> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti at amd.com>
> ---
> drivers/soc/xilinx/zynqmp_power.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index 965b1143936a..8570ab1a6857 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -3,6 +3,7 @@
> * Xilinx Zynq MPSoC Power Management
> *
> * Copyright (C) 2014-2019 Xilinx, Inc.
> + * Copyright (C) 2024, Advanced Micro Devices, Inc.
Really? Your lawyers think that your 3 line change deserves this
addition as well? If so, please have them sign off on the next version
of this patch submission so that we get their confirmation that this is
what they want to start doing for all AMD submissions.
>From my point of view, this change is not ok.
thanks,
greg "I talk to too many lawyers" k-h
More information about the linux-arm-kernel
mailing list