ASoC: rockchip: i2s: Fix missing error code in rockchip_i2s_probe()
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 24 Jun 2022 08:27:45 +0000 (16:27 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 24 Jun 2022 13:06:58 +0000 (14:06 +0100)
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.

This was found by coccicheck:

sound/soc/rockchip/rockchip_i2s.c:810 rockchip_i2s_probe() warn: missing error code 'ret'.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220624082745.68367-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s.c

index d300eee9ddaae0110acb45ce2baabd95a6f58d13..0ed01624a2dbde27e579a4f07143fc150b257c36 100644 (file)
@@ -807,6 +807,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
                        i2s->bclk_off = pinctrl_lookup_state(i2s->pinctrl, "bclk_off");
                        if (IS_ERR_OR_NULL(i2s->bclk_off)) {
                                dev_err(&pdev->dev, "failed to find i2s bclk_off\n");
+                               ret = -EINVAL;
                                goto err_clk;
                        }
                }