mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Intel: Skylake: Fix inconsistent IS_ERR and PTR_ERR
@ 2020-02-21 10:11 Xu Wang
  2020-02-21 14:41 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Xu Wang @ 2020-02-21 10:11 UTC (permalink / raw)
  To: perex, tiwai, alsa-devel; +Cc: linux-kernel

PTR_ERR should access the value just tested by IS_ERR.
In skl_clk_dev_probe(),it is inconsistent.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 sound/soc/intel/skylake/skl-ssp-clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl-ssp-clk.c b/sound/soc/intel/skylake/skl-ssp-clk.c
index 1c0e5226cb5b..f7aae10b629b 100644
--- a/sound/soc/intel/skylake/skl-ssp-clk.c
+++ b/sound/soc/intel/skylake/skl-ssp-clk.c
@@ -384,7 +384,7 @@ static int skl_clk_dev_probe(struct platform_device *pdev)
 				&clks[i], clk_pdata, i);
 
 		if (IS_ERR(data->clk[data->avail_clk_cnt])) {
-			ret = PTR_ERR(data->clk[data->avail_clk_cnt++]);
+			ret = PTR_ERR(data->clk[data->avail_clk_cnt]);
 			goto err_unreg_skl_clk;
 		}
 	}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-24 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 10:11 [PATCH] Intel: Skylake: Fix inconsistent IS_ERR and PTR_ERR Xu Wang
2020-02-21 14:41 ` Joe Perches
2020-02-21 15:40   ` Pierre-Louis Bossart
2020-02-23 15:59     ` Cezary Rojewski
2020-02-24 10:42       ` Amadeusz Sławiński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome