aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc/dbri.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sparc/dbri.c')
-rw-r--r--sound/sparc/dbri.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 941c7b1e7ebb..a56f81bb0049 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2657,26 +2657,20 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev)
2657 } 2657 }
2658 2658
2659 dbri = (snd_dbri_t *) card->private_data; 2659 dbri = (snd_dbri_t *) card->private_data;
2660 if ((err = snd_dbri_pcm(dbri)) < 0) { 2660 if ((err = snd_dbri_pcm(dbri)) < 0)
2661 snd_dbri_free(dbri); 2661 goto _err;
2662 snd_card_free(card);
2663 return err;
2664 }
2665 2662
2666 if ((err = snd_dbri_mixer(dbri)) < 0) { 2663 if ((err = snd_dbri_mixer(dbri)) < 0)
2667 snd_dbri_free(dbri); 2664 goto _err;
2668 snd_card_free(card);
2669 return err;
2670 }
2671 2665
2672 /* /proc file handling */ 2666 /* /proc file handling */
2673 snd_dbri_proc(dbri); 2667 snd_dbri_proc(dbri);
2674 2668
2675 if ((err = snd_card_register(card)) < 0) { 2669 if ((err = snd_card_set_generic_dev(card)) < 0)
2676 snd_dbri_free(dbri); 2670 goto _err;
2677 snd_card_free(card); 2671
2678 return err; 2672 if ((err = snd_card_register(card)) < 0)
2679 } 2673 goto _err;
2680 2674
2681 printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", 2675 printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n",
2682 dev, dbri->regs, 2676 dev, dbri->regs,
@@ -2684,6 +2678,11 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev)
2684 dev++; 2678 dev++;
2685 2679
2686 return 0; 2680 return 0;
2681
2682 _err:
2683 snd_dbri_free(dbri);
2684 snd_card_free(card);
2685 return err;
2687} 2686}
2688 2687
2689/* Probe for the dbri chip and then attach the driver. */ 2688/* Probe for the dbri chip and then attach the driver. */