diff options
author | Hannes Eder <hannes@hanneseder.net> | 2008-11-18 12:25:06 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-18 12:27:58 -0500 |
commit | 2af752936b311a846622668f8b0f1893d8eccade (patch) | |
tree | 5ba3f1010d20490d31dcb557d4d3a6f37899ed2f /sound | |
parent | fd64138c0eff8351b93ef99f7da929bb8a49b9ed (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/init.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index af1e407ca27f..0d5520c415d3 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -637,8 +637,12 @@ int snd_card_register(struct snd_card *card) | |||
637 | #endif | 637 | #endif |
638 | #ifndef CONFIG_SYSFS_DEPRECATED | 638 | #ifndef CONFIG_SYSFS_DEPRECATED |
639 | if (card->card_dev) { | 639 | if (card->card_dev) { |
640 | device_create_file(card->card_dev, &card_id_attrs); | 640 | err = device_create_file(card->card_dev, &card_id_attrs); |
641 | device_create_file(card->card_dev, &card_number_attrs); | 641 | if (err < 0) |
642 | return err; | ||
643 | err = device_create_file(card->card_dev, &card_number_attrs); | ||
644 | if (err < 0) | ||
645 | return err; | ||
642 | } | 646 | } |
643 | #endif | 647 | #endif |
644 | return 0; | 648 | return 0; |