summaryrefslogtreecommitdiff
path: root/sound/soc/ti
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-02-10 09:24:22 +0000
committerMark Brown <broonie@kernel.org>2020-02-11 11:47:59 +0000
commitf4d95de415b286090c1bf739c20a5ea2aefda834 (patch)
tree611cb1c0bfcc037138e124560f6c4b1ae365f9df /sound/soc/ti
parentda22a95313197a349c557b98e3bee4e2b04d4f9d (diff)
ASoC: ti: davinci-mcasp: remove redundant assignment to variable ret
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>
Diffstat (limited to 'sound/soc/ti')
-rw-r--r--sound/soc/ti/davinci-mcasp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c
index d9c3a3210a24..734ffe925c4d 100644
--- a/sound/soc/ti/davinci-mcasp.c
+++ b/sound/soc/ti/davinci-mcasp.c
@@ -1765,10 +1765,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;