Message ID | CAPgLHd9HRb_o+hac5_RjKhK1K-jJFtQmrv9P2iy7zegQv=WOcw@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
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 <weiyj.lk@gmail.com> wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > Add the missing unlock before return from function > wcn36xx_smd_update_proberesp_tmpl() in the error > handling case. > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > --- > 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; >
On 10/30/2013 03:12 PM, Eugene Krasnikov wrote: > 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. Hi, I used coccinelle with script to found this. ^_^ > > On Wed, Oct 30, 2013 at 5:30 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote: >> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> >> >> Add the missing unlock before return from function >> wcn36xx_smd_update_proberesp_tmpl() in the error >> handling case. >> >> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> >> --- >> 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; >> > > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;