[PATCH v3 2/6] staging: most: sound: correct label name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the lable name that is used to jump to error
handling section of function audio_probe_channel() in case
something went wrong.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
v2:
	nothing
v3:
	- rename label name of added goto instruction

 drivers/staging/most/sound/sound.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c
index cb02590..22e106f 100644
--- a/drivers/staging/most/sound/sound.c
+++ b/drivers/staging/most/sound/sound.c
@@ -624,7 +624,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
 	ret = snd_card_new(&iface->dev, -1, card_name, THIS_MODULE,
 			   sizeof(*channel), &adpt->card);
 	if (ret < 0)
-		goto err_free_card;
+		goto err_free_adpt;
 	snprintf(adpt->card->driver, sizeof(adpt->card->driver),
 		 "%s", DRIVER_NAME);
 	snprintf(adpt->card->shortname, sizeof(adpt->card->shortname),
@@ -649,7 +649,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
 	channel = kzalloc(sizeof(*channel), GFP_KERNEL);
 	if (!channel) {
 		ret = -ENOMEM;
-		goto err_free_card;
+		goto err_free_adpt;
 	}
 	channel->card = adpt->card;
 	channel->cfg = cfg;
@@ -661,13 +661,13 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
 	ret = audio_set_hw_params(&channel->pcm_hardware, ch_num, sample_res,
 				  cfg);
 	if (ret)
-		goto err_free_card;
+		goto err_free_adpt;
 
 	ret = snd_pcm_new(adpt->card, card_name, adpt->pcm_dev_idx,
 			  playback_count, capture_count, &pcm);
 
 	if (ret < 0)
-		goto err_free_card;
+		goto err_free_adpt;
 
 	pcm->private_data = channel;
 	snprintf(pcm->name, sizeof(pcm->name), card_name);
@@ -676,12 +676,12 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
 	if (create) {
 		ret = snd_card_register(adpt->card);
 		if (ret < 0)
-			goto err_free_card;
+			goto err_free_adpt;
 		adpt->registered = true;
 	}
 	return 0;
 
-err_free_card:
+err_free_adpt:
 	release_adapter(adpt);
 	return ret;
 }
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux