aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/6fire/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/6fire/chip.c')
-rw-r--r--sound/usb/6fire/chip.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/sound/usb/6fire/chip.c b/sound/usb/6fire/chip.c
index dcddfc354ba6..c7641cb50616 100644
--- a/sound/usb/6fire/chip.c
+++ b/sound/usb/6fire/chip.c
@@ -143,37 +143,32 @@ static int usb6fire_chip_probe(struct usb_interface *intf,
chip->card = card;
ret = usb6fire_comm_init(chip);
- if (ret < 0) {
- usb6fire_chip_destroy(chip);
- return ret;
- }
+ if (ret < 0)
+ goto destroy_chip;
ret = usb6fire_midi_init(chip);
- if (ret < 0) {
- usb6fire_chip_destroy(chip);
- return ret;
- }
+ if (ret < 0)
+ goto destroy_chip;
ret = usb6fire_pcm_init(chip);
- if (ret < 0) {
- usb6fire_chip_destroy(chip);
- return ret;
- }
+ if (ret < 0)
+ goto destroy_chip;
ret = usb6fire_control_init(chip);
- if (ret < 0) {
- usb6fire_chip_destroy(chip);
- return ret;
- }
+ if (ret < 0)
+ goto destroy_chip;
ret = snd_card_register(card);
if (ret < 0) {
dev_err(&intf->dev, "cannot register card.");
- usb6fire_chip_destroy(chip);
- return ret;
+ goto destroy_chip;
}
usb_set_intfdata(intf, chip);
return 0;
+
+destroy_chip:
+ usb6fire_chip_destroy(chip);
+ return ret;
}
static void usb6fire_chip_disconnect(struct usb_interface *intf)
@@ -198,7 +193,7 @@ static void usb6fire_chip_disconnect(struct usb_interface *intf)
}
}
-static struct usb_device_id device_table[] = {
+static const struct usb_device_id device_table[] = {
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x0ccd,