484e8d5041a333748c4e2c8c8623e95ccb105b51
[openwrt/staging/blogic.git] /
1 From d460e8c1272c886639cbc1a5b054a980007dadc3 Mon Sep 17 00:00:00 2001
2 From: Matt Flax <flatmax@flatmax.org>
3 Date: Sun, 27 Mar 2022 22:42:47 +1100
4 Subject: [PATCH] audioinjector.net: stereo and zero, use
5 dev_err_probe, report success
6
7 Use dev_err_probe to follow best practice, and leave a message in
8 the kernel log indicate the driver was started successfully.
9 ---
10 sound/soc/bcm/audioinjector-pi-soundcard.c | 8 +++++---
11 1 file changed, 5 insertions(+), 3 deletions(-)
12
13 --- a/sound/soc/bcm/audioinjector-pi-soundcard.c
14 +++ b/sound/soc/bcm/audioinjector-pi-soundcard.c
15 @@ -158,9 +158,11 @@ static int audioinjector_pi_soundcard_pr
16 }
17 }
18
19 - if ((ret = devm_snd_soc_register_card(&pdev->dev, card))) {
20 - dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
21 - }
22 + if ((ret = devm_snd_soc_register_card(&pdev->dev, card)))
23 + return dev_err_probe(&pdev->dev, ret, "%s\n", __func__);
24 +
25 + dev_info(&pdev->dev, "successfully loaded\n");
26 +
27 return ret;
28 }
29