From: Harshit Mogalapalli Date: Tue, 29 Aug 2023 07:36:35 +0000 (-0700) Subject: ASoC: cs42l43: Fix missing error code in cs42l43_codec_probe() X-Git-Tag: v6.6-rc1~23^2^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e07f8bfd959d2d09823430eab35d12182446dcf;p=thirdparty%2Flinux.git ASoC: cs42l43: Fix missing error code in cs42l43_codec_probe() When clk_get_optional() fails, the error handling code does a 'goto err_pm' with ret = 0, which is resturning success on a failure path. Fix this by assigning the PTR_ERR(priv-mclk) to ret variable. Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43") Signed-off-by: Harshit Mogalapalli mclk = clk_get_optional(cs42l43->dev, "mclk"); if (IS_ERR(priv->mclk)) { - dev_err_probe(priv->dev, PTR_ERR(priv->mclk), "Failed to get mclk\n"); + ret = PTR_ERR(priv->mclk); + dev_err_probe(priv->dev, ret, "Failed to get mclk\n"); goto err_pm; }