Skip to content
Snippets Groups Projects
Commit 6ce1d63e authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: core: Don't allow NULL device for memory allocation


Since we covered all callers with NULL device pointer, let's catch the
remaining calls with NULL and warn explicitly.

Acked-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8f74ae39
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,8 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,
return -ENXIO;
if (WARN_ON(!dmab))
return -ENXIO;
if (WARN_ON(!device))
return -EINVAL;
dmab->dev.type = type;
dmab->dev.dev = device;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment