Skip to content

Commit 043faef

Browse files
tobluxtiwai
authored andcommitted
ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp()
Use pr_warn() instead of dev_warn() when 'pdev' is NULL to avoid a potential NULL pointer dereference. Cc: stable@vger.kernel.org Fixes: 2086917 ("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>
1 parent db98ee5 commit 043faef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/isa/ad1816a/ad1816a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int snd_card_ad1816a_pnp(int dev, struct pnp_card_link *card,
9898
pdev = pnp_request_card_device(card, id->devs[1].id, NULL);
9999
if (pdev == NULL) {
100100
mpu_port[dev] = -1;
101-
dev_warn(&pdev->dev, "MPU401 device busy, skipping.\n");
101+
pr_warn("MPU401 device busy, skipping.\n");
102102
return 0;
103103
}
104104

0 commit comments

Comments
 (0)