187-ASoC-atmel-atmel-i2s-remove-useless-initialization.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From e53725fe0c7e6b52927280272f49fe5f4b4ef317 Mon Sep 17 00:00:00 2001
  2. From: Pierre-Louis Bossart <[email protected]>
  3. Date: Fri, 26 Mar 2021 16:59:13 -0500
  4. Subject: [PATCH 187/247] ASoC: atmel: atmel-i2s: remove useless initialization
  5. Cppcheck complains:
  6. sound/soc/atmel/atmel-i2s.c:628:6: style: Redundant initialization for 'err'. The initialized value is overwritten before it is read. [redundantInitialization]
  7. err = devm_request_irq(&pdev->dev, irq, atmel_i2s_interrupt, 0,
  8. ^
  9. sound/soc/atmel/atmel-i2s.c:598:10: note: err is initialized
  10. int err = -ENXIO;
  11. ^
  12. sound/soc/atmel/atmel-i2s.c:628:6: note: err is overwritten
  13. err = devm_request_irq(&pdev->dev, irq, atmel_i2s_interrupt, 0,
  14. ^
  15. Signed-off-by: Pierre-Louis Bossart <[email protected]>
  16. Reviewed-by: Codrin Ciubotariu <[email protected]>
  17. Link: https://lore.kernel.org/r/[email protected]
  18. Signed-off-by: Mark Brown <[email protected]>
  19. ---
  20. sound/soc/atmel/atmel-i2s.c | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. diff --git a/sound/soc/atmel/atmel-i2s.c b/sound/soc/atmel/atmel-i2s.c
  23. index 7483c474ccd7..e7169c63becd 100644
  24. --- a/sound/soc/atmel/atmel-i2s.c
  25. +++ b/sound/soc/atmel/atmel-i2s.c
  26. @@ -613,7 +613,7 @@ static int atmel_i2s_probe(struct platform_device *pdev)
  27. struct regmap *regmap;
  28. void __iomem *base;
  29. int irq;
  30. - int err = -ENXIO;
  31. + int err;
  32. unsigned int pcm_flags = 0;
  33. unsigned int version;
  34. --
  35. 2.32.0