]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
firmware: zynqmp: Check if rx channel dev pointer is valid
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Mon, 20 Jun 2022 16:36:36 +0000 (18:36 +0200)
committerMichal Simek <michal.simek@amd.com>
Fri, 24 Jun 2022 12:37:27 +0000 (14:37 +0200)
Check if rx channel dev pointer is valid and not if the address of the
pointer is valid.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Link: https://lore.kernel.org/r/20220620163650.18756-1-stefan.herbrechtsmeier-oss@weidmueller.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/firmware/firmware-zynqmp.c

index 0f0d2b07c00597bcb3a7534cb1cb0ed18f76a640..341d7cf1358891f0226665905a00924dbb845408 100644 (file)
@@ -92,7 +92,7 @@ static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen)
            res_maxlen > PMUFW_PAYLOAD_ARG_CNT)
                return -EINVAL;
 
-       if (!(zynqmp_power.tx_chan.dev) || !(&zynqmp_power.rx_chan.dev))
+       if (!(zynqmp_power.tx_chan.dev) || !(zynqmp_power.rx_chan.dev))
                return -EINVAL;
 
        debug("%s, Sending IPI message with ID: 0x%0x\n", __func__, req[0]);