public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] ALSA: hda: cs35l41: Improve dev_err_probe() messaging
@ 2022-07-11  9:52 Andy Shevchenko
  2022-07-11  9:52 ` [PATCH v1 2/4] ALSA: hda: cs35l41: Allow compilation test on non-ACPI configurations Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-07-11  9:52 UTC (permalink / raw)
  To: Takashi Iwai, Lucas Tanure, Andy Shevchenko, alsa-devel,
	linux-kernel, patches
  Cc: Jaroslav Kysela, Takashi Iwai, James Schulman, David Rhodes,
	Richard Fitzgerald

Drop duplicate print of returned value in the messages and use pattern
return dev_err_probe(...) where it's possible.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/pci/hda/cs35l41_hda.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index cce27a86267f..23a97ada7272 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -460,10 +460,8 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
 	dev_set_drvdata(dev, cs35l41);
 
 	ret = cs35l41_hda_read_acpi(cs35l41, device_name, id);
-	if (ret) {
-		dev_err_probe(cs35l41->dev, ret, "Platform not supported %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(cs35l41->dev, ret, "Platform not supported\n");
 
 	if (IS_ERR(cs35l41->reset_gpio)) {
 		ret = PTR_ERR(cs35l41->reset_gpio);
@@ -471,7 +469,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
 		if (ret == -EBUSY) {
 			dev_info(cs35l41->dev, "Reset line busy, assuming shared reset\n");
 		} else {
-			dev_err_probe(cs35l41->dev, ret, "Failed to get reset GPIO: %d\n", ret);
+			dev_err_probe(cs35l41->dev, ret, "Failed to get reset GPIO\n");
 			goto err;
 		}
 	}
-- 
2.35.1


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

end of thread, other threads:[~2022-07-12 10:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11  9:52 [PATCH v1 1/4] ALSA: hda: cs35l41: Improve dev_err_probe() messaging Andy Shevchenko
2022-07-11  9:52 ` [PATCH v1 2/4] ALSA: hda: cs35l41: Allow compilation test on non-ACPI configurations Andy Shevchenko
2022-07-12  4:38   ` kernel test robot
2022-07-11  9:52 ` [PATCH v1 3/4] ALSA: hda: cs35l41: Drop wrong use of ACPI_PTR() Andy Shevchenko
2022-07-11  9:52 ` [PATCH v1 4/4] ALSA: hda: cs35l41: Consolidate selections under SND_HDA_SCODEC_CS35L41 Andy Shevchenko
2022-07-12  9:18 ` [PATCH v1 1/4] ALSA: hda: cs35l41: Improve dev_err_probe() messaging Takashi Iwai
2022-07-12 10:01   ` Andy Shevchenko

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