From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342AbdHMBIY (ORCPT ); Sat, 12 Aug 2017 21:08:24 -0400 Received: from smtprelay0154.hostedemail.com ([216.40.44.154]:36676 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752156AbdHMBIW (ORCPT ); Sat, 12 Aug 2017 21:08:22 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3872:3874:4321:4384:4385:4395:5007:10004:10400:10848:11026:11232:11658:11914:12043:12048:12296:12533:12740:12760:12895:13069:13255:13311:13357:13439:14659:14721:21080:21627:30009:30012:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: vein71_48d4700466c16 X-Filterd-Recvd-Size: 1723 Message-ID: <1502586498.3099.27.camel@perches.com> Subject: Re: [PATCH 2/3] ALSA: mpu401: Use common error handling code in snd_mpu401_uart_new() From: Joe Perches To: SF Markus Elfring , alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai , Takashi Sakamoto Cc: LKML , kernel-janitors@vger.kernel.org Date: Sat, 12 Aug 2017 18:08:18 -0700 In-Reply-To: <06592078-5382-5f6a-f9aa-c85f293e1734@users.sourceforge.net> References: <47947226-bd09-5d15-c0d2-a9f4a659e1b4@users.sourceforge.net> <06592078-5382-5f6a-f9aa-c85f293e1734@users.sourceforge.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-08-12 at 21:12 +0200, SF Markus Elfring wrote: > Add a jump target so that a bit of exception handling can be better > reused at the end of this function. [] > diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c [] > @@ -612,6 +612,9 @@ int snd_mpu401_uart_new(struct snd_card *card, int device, > if (rrawmidi) > *rrawmidi = rmidi; > return 0; > +free_device: > + snd_device_free(card, rmidi); > + return err; > } > > EXPORT_SYMBOL(snd_mpu401_uart_new); It may be more common and better to leave a blank line between a single line return and a label. It separates logical points in the function a bit more.