From patchwork Sun Oct 29 20:13:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10031647 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B0EC600C5 for ; Sun, 29 Oct 2017 20:14:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DD7828755 for ; Sun, 29 Oct 2017 20:14:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1202A28757; Sun, 29 Oct 2017 20:14:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA80B28755 for ; Sun, 29 Oct 2017 20:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdJ2UN7 (ORCPT ); Sun, 29 Oct 2017 16:13:59 -0400 Received: from mout.web.de ([212.227.15.14]:64978 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbdJ2UN5 (ORCPT ); Sun, 29 Oct 2017 16:13:57 -0400 Received: from [192.168.1.2] ([78.49.32.239]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lw0vl-1d6ROh0v8f-017oZe; Sun, 29 Oct 2017 21:13:46 +0100 Subject: [PATCH 3/5] wlcore: Return directly after a failed ieee80211_beacon_get() in wlcore_set_beacon_template() From: SF Markus Elfring To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Arend Van Spriel , Eyal Reizer , Iain Hunter , James Minor , Johannes Berg , Kalle Valo , Maxim Altshul , Pieter-Paul Giesberts Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <6ea50cb4-8871-6752-6275-50da266f0e7d@users.sourceforge.net> Date: Sun, 29 Oct 2017 21:13:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:DzMV4OnnwDfoCU+H0hts46m/Ir1SB9a1OEGr8QUHCHWDsWupr6d 5o4ca+xAeT6Bd9/HsBmbGbPmSrjjEwnwd6v9hJ69BHJowiH5+PqdtpT6w0alytNc9wGLW2x hp1P0tB1UqU9n7WCJktdx4Eioeb4/LC7JSEaVuFGevKWdOj0XDe2I7A6AdBoX0rDJ7f1L+v IgxQuJcfbYnDNvMCoMcRw== X-UI-Out-Filterresults: notjunk:1; V01:K0:px6IPubvfog=:Bw765UlUYNoYWDfrrrV2hE nl/MOqCXHYKkULRjRKpQTSjNc0/Iypt2bPOB175K5QpQlhV/fysfXvbh8hfHcRaVW0IXTO+Av TCdra3cVZU9clLVm6EM0GFe7qo3QJzKkCJSWFSXZ+SQaIzKshFfAM/7i+1SOvVHcnaHvN0w+n LH4xP8kYsnQPNWUbdcd0EHdtOhIpN841LJxQIDUMxt6noJSACiE3MHE9+OOWNnzn0hjl0alod dcJ9a71aFXowEO7kFGGVZUr8rnWO+YBJjoXRsI/Lyoy94ZXvhl3Q0V0tVxkQtyLa0S2Ycz1XQ Sx3F2k8PfgF/n0PzFkvfYYKTkhh8762HJAXWHOkkuVAy9Fxfq6CNw+uuUCkQO8RoB53EG+3pD dQxWK7Q1DHyASXHaPIXgvj+0ak+B5TJSd2E9a0Y+7PHJhcMxQmdMTkE8sUec+qpg+zDLZWxP4 S+/qzHenNaxivVD0ON/owM0SMjEMvNH2hioPJlYBPogLR0wXsS/qsE637s4rQABapJGIX7GKq VOLmpGiN6FAnZip5cRemc0NH3jrIGQdGpuVDeRSR95TyWIK9SXEykRqBqvCdHucBx1Kdr/Egw LISypx+btG0zhuFkAJ2p8FhxFXJSIoJTxFkIdvPj0GrgLhEl6b4OuuFNaDJ45cB0W5RDlsAXd iF9wv4QaAFGzK4rCiywlAe6O31/9xUZaiH/bNM+fWDsAEvDCctOnl8kQN8BbYteXIArcmA6qT UAen1ozlfXt8ADPSJUGw7F820uWPRSKIasM8EPhr01MoQYnWQarw3eK58i+OrRlFDojwj7Njb NvO38scdZH8YsquPVOW/D0MRAxKPVvFDbVRQZiTsKOKOmOP62o= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 29 Oct 2017 20:00:41 +0100 Return directly after a call of the function "ieee80211_beacon_get" failed at the beginning. Signed-off-by: Markus Elfring Reviewed-by: Julian Calaby --- drivers/net/wireless/ti/wlcore/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index efea811c1c83..0365b5e40a8d 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -4018,10 +4018,8 @@ static int wlcore_set_beacon_template(struct wl1271 *wl, struct sk_buff *beacon = ieee80211_beacon_get(wl->hw, vif); u16 tmpl_id; - if (!beacon) { - ret = -EINVAL; - goto out; - } + if (!beacon) + return -EINVAL; wl1271_debug(DEBUG_MASTER, "beacon updated");