summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-07-03 22:06:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-17 18:43:45 +0200
commitef84c94d11ff972ecc3507f1ed092046bf6204b2 (patch)
tree9094d7ea08e4008d73766873ff89d5cdf2c16d80
parentfd3f4940c0297d8c8ca1b9e7caf8801c28f15001 (diff)
ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp()
commit 043faef334a1f3d96ae88e1b7618bfa2b4946388 upstream. Use pr_warn() instead of dev_warn() when 'pdev' is NULL to avoid a potential NULL pointer dereference. Cc: stable@vger.kernel.org Fixes: 20869176d7a7 ("ALSA: ad1816a: Use standard print API") Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250703200616.304309-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/isa/ad1816a/ad1816a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 99006dc4777e..5c9e2d41d900 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -98,7 +98,7 @@ static int snd_card_ad1816a_pnp(int dev, struct pnp_card_link *card,
pdev = pnp_request_card_device(card, id->devs[1].id, NULL);
if (pdev == NULL) {
mpu_port[dev] = -1;
- dev_warn(&pdev->dev, "MPU401 device busy, skipping.\n");
+ pr_warn("MPU401 device busy, skipping.\n");
return 0;
}