diff options
Diffstat (limited to 'sound/core/init.c')
-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 af1e407ca27..0d5520c415d 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -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; |