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: [email protected] Fixes: 2086917 ("ALSA: ad1816a: Use standard print API") Signed-off-by: Thorsten Blum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent db98ee5 commit 043faef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)