From patchwork Thu Mar 3 16:51:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 8494061 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E3449F2F0 for ; Thu, 3 Mar 2016 16:51:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 631D82017E for ; Thu, 3 Mar 2016 16:51:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 735BD20364 for ; Thu, 3 Mar 2016 16:51:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755398AbcCCQvb (ORCPT ); Thu, 3 Mar 2016 11:51:31 -0500 Received: from mailout.easymail.ca ([64.68.201.169]:52578 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbcCCQva (ORCPT ); Thu, 3 Mar 2016 11:51:30 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 5F615E74D; Thu, 3 Mar 2016 11:51:29 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at mailout.easymail.ca X-Spam-Score: -3.69 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (easymail-mailout.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aWCIJdLOy4gk; Thu, 3 Mar 2016 11:51:28 -0500 (EST) Received: from mail.gonehiking.org (c-73-181-52-62.hsd1.co.comcast.net [73.181.52.62]) by mailout.easymail.ca (Postfix) with ESMTPA id CB6CEE759; Thu, 3 Mar 2016 11:51:28 -0500 (EST) Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 2CB4C9F232; Thu, 3 Mar 2016 09:51:28 -0700 (MST) From: Shuah Khan To: mchehab@osg.samsung.com, perex@perex.cz, tiwai@suse.com, dan.carpenter@oracle.com Cc: Shuah Khan , alsa-devel@alsa-project.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sound/usb: Use meaninful names for goto labels Date: Thu, 3 Mar 2016 09:51:26 -0700 Message-Id: <1457023886-4428-1-git-send-email-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.5.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix to use meaningful names instead of numbered goto labels Signed-off-by: Shuah Khan --- sound/usb/media.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/usb/media.c b/sound/usb/media.c index b87d5b3..ab6a642 100644 --- a/sound/usb/media.c +++ b/sound/usb/media.c @@ -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, &mctl->media_entity); if (ret) - goto err1; + goto free_mctl; mctl->intf_devnode = media_devnode_create(mdev, intf_type, 0, MAJOR(pcm_dev->devt), MINOR(pcm_dev->devt)); if (!mctl->intf_devnode) { ret = -ENOMEM; - goto err2; + goto unregister_entity; } mctl->intf_link = media_create_intf_link(&mctl->media_entity, &mctl->intf_devnode->intf, MEDIA_LNK_FL_ENABLED); if (!mctl->intf_link) { ret = -ENOMEM; - goto err3; + goto devnode_remove; } /* create link between mixer and audio */ @@ -109,7 +109,7 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, &mctl->media_entity, 0, MEDIA_LNK_FL_ENABLED); if (ret) - goto err4; + goto remove_intf_link; break; } } @@ -117,13 +117,13 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, subs->media_ctl = mctl; return 0; -err4: +remove_intf_link: media_remove_intf_link(mctl->intf_link); -err3: +devnode_remove: media_devnode_remove(mctl->intf_devnode); -err2: +unregister_entity: media_device_unregister_entity(&mctl->media_entity); -err1: +free_mctl: kfree(mctl); return ret; }