Patch "drivers: soc: xilinx: check return status of get_api_version()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drivers: soc: xilinx: check return status of get_api_version()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drivers-soc-xilinx-check-return-status-of-get_api_ve.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c9bf9ab5231626c369b5edd70e72d2def6f45ae5
Author: Jay Buddhabhatti <jay.buddhabhatti@xxxxxxx>
Date:   Wed May 15 04:23:45 2024 -0700

    drivers: soc: xilinx: check return status of get_api_version()
    
    [ Upstream commit 9b003e14801cf85a8cebeddc87bc9fc77100fdce ]
    
    Currently return status is not getting checked for get_api_version
    and because of that for x86 arch we are getting below smatch error.
    
        CC      drivers/soc/xilinx/zynqmp_power.o
    drivers/soc/xilinx/zynqmp_power.c: In function 'zynqmp_pm_probe':
    drivers/soc/xilinx/zynqmp_power.c:295:12: warning: 'pm_api_version' is
    used uninitialized [-Wuninitialized]
        295 |         if (pm_api_version < ZYNQMP_PM_VERSION)
            |            ^
        CHECK   drivers/soc/xilinx/zynqmp_power.c
    drivers/soc/xilinx/zynqmp_power.c:295 zynqmp_pm_probe() error:
    uninitialized symbol 'pm_api_version'.
    
    So, check return status of pm_get_api_version and return error in case
    of failure to avoid checking uninitialized pm_api_version variable.
    
    Fixes: b9b3a8be28b3 ("firmware: xilinx: Remove eemi ops for get_api_version")
    Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20240515112345.24673-1-jay.buddhabhatti@xxxxxxx
    Signed-off-by: Michal Simek <michal.simek@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index f8c301984d4f9..2653d29ba829b 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -178,7 +178,9 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
 	u32 pm_api_version;
 	struct mbox_client *client;
 
-	zynqmp_pm_get_api_version(&pm_api_version);
+	ret = zynqmp_pm_get_api_version(&pm_api_version);
+	if (ret)
+		return ret;
 
 	/* Check PM API version number */
 	if (pm_api_version < ZYNQMP_PM_VERSION)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux