From: Jaroslav Kysela <perex@perex.cz>
To: "Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>, "Takashi Iwai" <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] ALSA: Improve style of pnp_device_id array terminators
Date: Tue, 9 Jun 2026 20:38:57 +0200 [thread overview]
Message-ID: <15b9f06b-952b-4c55-aea3-fd64f456d30e@perex.cz> (raw)
In-Reply-To: <47ae32220446ec1869898cf5e4b75ec94c32dfdf.1781023479.git.u.kleine-koenig@baylibre.com>
On 6/9/26 18:46, Uwe Kleine-König (The Capable Hub) wrote:
> To match how device-id array terminators look like for other device
> types drop `.id = ""` from it and let the compiler care for zeroing the
> entry.
>
> There are no changes in the compiled drivers, only the source looks
> nicer.
It's not true. Unless the matching and lookup functions are not changed,
there's difference between NULL pointer and pointer to an empty string.
See match_device in drivers/pnp/driver.c - "while (*drv_id->id)". Your change
will cause NULL pointer dereference.
Jaroslav
--
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
next prev parent reply other threads:[~2026-06-09 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 16:46 Uwe Kleine-König (The Capable Hub)
2026-06-09 18:38 ` Jaroslav Kysela [this message]
2026-06-09 19:20 ` Uwe Kleine-König (The Capable Hub)
2026-06-09 19:26 ` Jaroslav Kysela
2026-06-10 7:25 ` Takashi Iwai
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=15b9f06b-952b-4c55-aea3-fd64f456d30e@perex.cz \
--to=perex@perex.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.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
all inboxes | Powered by JetHome®