Skip to content

Commit

Permalink
ALSA: hda: cs35l41: Improve dev_err_probe() messaging
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20220711095219.36915-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Andy Shevchenko authored and Takashi Iwai committed Jul 12, 2022
1 parent 6429993 commit e35cd68
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sound/pci/hda/cs35l41_hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,18 +460,16 @@ 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);
cs35l41->reset_gpio = NULL;
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;
}
}
Expand Down

0 comments on commit e35cd68

Please sign in to comment.