提交 2af75293 编写于 作者: H Hannes Eder 提交者: Takashi Iwai

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: NHannes Eder <hannes@hanneseder.net>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 fd64138c
...@@ -637,8 +637,12 @@ int snd_card_register(struct snd_card *card) ...@@ -637,8 +637,12 @@ int snd_card_register(struct snd_card *card)
#endif #endif
#ifndef CONFIG_SYSFS_DEPRECATED #ifndef CONFIG_SYSFS_DEPRECATED
if (card->card_dev) { if (card->card_dev) {
device_create_file(card->card_dev, &card_id_attrs); err = device_create_file(card->card_dev, &card_id_attrs);
device_create_file(card->card_dev, &card_number_attrs); if (err < 0)
return err;
err = device_create_file(card->card_dev, &card_number_attrs);
if (err < 0)
return err;
} }
#endif #endif
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册