Skip to content

Commit

Permalink
sound: Fix warnings relating to ignored return value in snd_card_regi…
Browse files Browse the repository at this point in the history
…ster

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>
  • Loading branch information
Hannes Eder authored and Takashi Iwai committed Nov 18, 2008
1 parent fd64138 commit 2af7529
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2af7529

Please sign in to comment.