mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 06:50:52 +07:00
sound: Fix warnings relating to ignored return value in snd_card_register
Do not ignore the return of 'device_create_file' in 'snd_card_register' and thereby fixing the following warnings: sound/core/init.c: In function 'snd_card_register': sound/core/init.c:640: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result sound/core/init.c:641: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
fd64138c0e
commit
2af752936b
@ -637,8 +637,12 @@ int snd_card_register(struct snd_card *card)
|
||||
#endif
|
||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||
if (card->card_dev) {
|
||||
device_create_file(card->card_dev, &card_id_attrs);
|
||||
device_create_file(card->card_dev, &card_number_attrs);
|
||||
err = device_create_file(card->card_dev, &card_id_attrs);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = device_create_file(card->card_dev, &card_number_attrs);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user