]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: ti: davinci-mcasp: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Mon, 10 Feb 2020 09:24:22 +0000 (09:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2024 07:08:13 +0000 (09:08 +0200)
[ Upstream commit f4d95de415b286090c1bf739c20a5ea2aefda834 ]

The assignment to ret is redundant as it is not used in the error
return path and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200210092423.327499-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: d18ca8635db2 ("ASoC: ti: davinci-mcasp: Fix race condition during probe")
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/ti/davinci-mcasp.c

index 0541071f454bdc70fd8e3afd40c955a007e26914..76267fd4a9d883860f60b6fabf027d92d0e69439 100644 (file)
@@ -1743,10 +1743,8 @@ static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of(
        } else if (match) {
                pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata),
                                     GFP_KERNEL);
-               if (!pdata) {
-                       ret = -ENOMEM;
-                       return pdata;
-               }
+               if (!pdata)
+                       return NULL;
        } else {
                /* control shouldn't reach here. something is wrong */
                ret = -EINVAL;