From: Colin Ian King Date: Mon, 10 Feb 2020 09:24:22 +0000 (+0000) Subject: ASoC: ti: davinci-mcasp: remove redundant assignment to variable ret X-Git-Tag: v5.4.279~160 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da5ff71c65511145e76063148a1aec398770e949;p=thirdparty%2Fkernel%2Fstable.git ASoC: ti: davinci-mcasp: remove redundant assignment to variable ret [ 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 Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200210092423.327499-1-colin.king@canonical.com Signed-off-by: Mark Brown Stable-dep-of: d18ca8635db2 ("ASoC: ti: davinci-mcasp: Fix race condition during probe") Signed-off-by: Sasha Levin --- diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index 0541071f454bd..76267fd4a9d88 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -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;