Return-path: Received: from mail-ve0-f169.google.com ([209.85.128.169]:34894 "EHLO mail-ve0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561Ab3J3HM1 (ORCPT ); Wed, 30 Oct 2013 03:12:27 -0400 Received: by mail-ve0-f169.google.com with SMTP id c14so689961vea.14 for ; Wed, 30 Oct 2013 00:12:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 30 Oct 2013 07:12:26 +0000 Message-ID: (sfid-20131030_081230_252469_BE9A367D) Subject: Re: [PATCH -next] wcn36xx: fix missing unlock on error in wcn36xx_smd_update_proberesp_tmpl() From: Eugene Krasnikov To: Wei Yongjun Cc: John Linville , yongjun_wei@trendmicro.com.cn, wcn36xx , linux-wireless Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Looks good to me! I assume this patch is the result of running smatch? I made the same patch, just did not have time to send it out. On Wed, Oct 30, 2013 at 5:30 AM, Wei Yongjun wrote: > From: Wei Yongjun > > Add the missing unlock before return from function > wcn36xx_smd_update_proberesp_tmpl() in the error > handling case. > > Signed-off-by: Wei Yongjun > --- > drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c > index f8c3a10..04df70b 100644 > --- a/drivers/net/wireless/ath/wcn36xx/smd.c > +++ b/drivers/net/wireless/ath/wcn36xx/smd.c > @@ -1327,7 +1327,8 @@ int wcn36xx_smd_update_proberesp_tmpl(struct wcn36xx *wcn, > if (skb->len > BEACON_TEMPLATE_SIZE) { > wcn36xx_warn("probe response template is too big: %d\n", > skb->len); > - return -E2BIG; > + ret = -E2BIG; > + goto out; > } > > msg.probe_resp_template_len = skb->len; > -- Best regards, Eugene