]> Git Repo - linux.git/commit
ALSA: core: Warn on empty module
authorTakashi Iwai <[email protected]>
Wed, 24 Jun 2020 16:03:00 +0000 (18:03 +0200)
committerTakashi Iwai <[email protected]>
Thu, 25 Jun 2020 13:01:35 +0000 (15:01 +0200)
commit81033c6b584b44514cbb16fffc26ca29a0fa6270
treefd63e03ce87c140e5479087c799063834e4a818a
parentc7440acc859778eed74b223fc41f094133aeaaf0
ALSA: core: Warn on empty module

The module argument passed to snd_card_new() must be a valid non-NULL
pointer when the module support is enabled.  Since ASoC driver passes
the argument from each snd_soc_card definition, one may forget to set
the owner field and lead to a NULL module easily.

For catching such an overlook, add a WARN_ON() in snd_card_new().
Also, put the card->module assignment in the ifdef block for a very
minor optimization.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
sound/core/init.c
This page took 0.051583 seconds and 4 git commands to generate.