From: "jempty.liang" <imntjempty@163.com>
To: perex@perex.cz, tiwai@suse.com
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
"jempty.liang" <imntjempty@163.com>
Subject: [PATCH] ALSA: core: Fix style issues in sound/core/device.c
Date: Mon, 17 Nov 2025 03:28:16 +0000 [thread overview]
Message-ID: <20251117032816.55442-1-imntjempty@163.com> (raw)
This patch fixes blank line and trailing whitespace issues in
sound/core/device.c as reported by checkpatch.pl.
Signed-off-by: jempty.liang <imntjempty@163.com>
---
sound/core/device.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/core/device.c b/sound/core/device.c
index cdc5af526739..207dbc8c3242 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -47,6 +47,7 @@ int snd_device_new(struct snd_card *card, enum snd_device_type type,
/* insert the entry in an incrementally sorted list */
list_for_each_prev(p, &card->devices) {
struct snd_device *pdev = list_entry(p, struct snd_device, list);
+
if ((unsigned int)pdev->type <= (unsigned int)type)
break;
}
@@ -130,7 +131,7 @@ EXPORT_SYMBOL_GPL(snd_device_disconnect);
void snd_device_free(struct snd_card *card, void *device_data)
{
struct snd_device *dev;
-
+
if (snd_BUG_ON(!card || !device_data))
return;
dev = look_for_dev(card, device_data);
@@ -147,6 +148,7 @@ static int __snd_device_register(struct snd_device *dev)
if (dev->state == SNDRV_DEV_BUILD) {
if (dev->ops->dev_register) {
int err = dev->ops->dev_register(dev);
+
if (err < 0)
return err;
}
@@ -190,7 +192,7 @@ int snd_device_register_all(struct snd_card *card)
{
struct snd_device *dev;
int err;
-
+
if (snd_BUG_ON(!card))
return -ENXIO;
list_for_each_entry(dev, &card->devices, list) {
--
2.25.1
next reply other threads:[~2025-11-17 3:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 3:28 jempty.liang [this message]
2025-11-17 16:22 ` [PATCH] ALSA: core: Fix style issues in sound/core/device.c Takashi Iwai
2025-11-18 9:43 ` jempty.liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251117032816.55442-1-imntjempty@163.com \
--to=imntjempty@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox