Commit c0fd9cdf authored by Shuah Khan's avatar Shuah Khan Committed by Mauro Carvalho Chehab

[media] sound/usb: Use meaninful names for goto labels

Fix to use meaningful names instead of numbered goto labels
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 9532e6bb
...@@ -84,21 +84,21 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, ...@@ -84,21 +84,21 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
ret = media_device_register_entity(mctl->media_dev, ret = media_device_register_entity(mctl->media_dev,
&mctl->media_entity); &mctl->media_entity);
if (ret) if (ret)
goto err1; goto free_mctl;
mctl->intf_devnode = media_devnode_create(mdev, intf_type, 0, mctl->intf_devnode = media_devnode_create(mdev, intf_type, 0,
MAJOR(pcm_dev->devt), MAJOR(pcm_dev->devt),
MINOR(pcm_dev->devt)); MINOR(pcm_dev->devt));
if (!mctl->intf_devnode) { if (!mctl->intf_devnode) {
ret = -ENOMEM; ret = -ENOMEM;
goto err2; goto unregister_entity;
} }
mctl->intf_link = media_create_intf_link(&mctl->media_entity, mctl->intf_link = media_create_intf_link(&mctl->media_entity,
&mctl->intf_devnode->intf, &mctl->intf_devnode->intf,
MEDIA_LNK_FL_ENABLED); MEDIA_LNK_FL_ENABLED);
if (!mctl->intf_link) { if (!mctl->intf_link) {
ret = -ENOMEM; ret = -ENOMEM;
goto err3; goto devnode_remove;
} }
/* create link between mixer and audio */ /* create link between mixer and audio */
...@@ -109,7 +109,7 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, ...@@ -109,7 +109,7 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
&mctl->media_entity, 0, &mctl->media_entity, 0,
MEDIA_LNK_FL_ENABLED); MEDIA_LNK_FL_ENABLED);
if (ret) if (ret)
goto err4; goto remove_intf_link;
break; break;
} }
} }
...@@ -117,13 +117,13 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, ...@@ -117,13 +117,13 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
subs->media_ctl = mctl; subs->media_ctl = mctl;
return 0; return 0;
err4: remove_intf_link:
media_remove_intf_link(mctl->intf_link); media_remove_intf_link(mctl->intf_link);
err3: devnode_remove:
media_devnode_remove(mctl->intf_devnode); media_devnode_remove(mctl->intf_devnode);
err2: unregister_entity:
media_device_unregister_entity(&mctl->media_entity); media_device_unregister_entity(&mctl->media_entity);
err1: free_mctl:
kfree(mctl); kfree(mctl);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment