From patchwork Thu May 7 12:13:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 6357331 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@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 73B3C9F32E for ; Thu, 7 May 2015 12:13:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71093203AA for ; Thu, 7 May 2015 12:13:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 731C420145 for ; Thu, 7 May 2015 12:13:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbbEGMN1 (ORCPT ); Thu, 7 May 2015 08:13:27 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:35578 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbbEGMN0 (ORCPT ); Thu, 7 May 2015 08:13:26 -0400 Received: by widdi4 with SMTP id di4so239663938wid.0 for ; Thu, 07 May 2015 05:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=u/lx8hBRUO9ag1JcgGbhUoeocS3AHdQwrp6YY8p8so8=; b=vH/BE52FwxY72B767Pa88Ozx5bYlWyxT/nmNxQIdHprViiiEgBxw7KquER5ODma4wE 4BASoCqD06USROyqvu+mWDcydANfIJtgIP8GNh3bvfyE6KLTn6AF8m5IXD4EOxe0tnvP 1EUyCcN9Y8Dha5i4TAgUSdQMpzzwJAeV0wtpDeo01TzRKBn2vX52AlqLVhE5Q5kQyaO8 Mk3NFyjh7fu5iVbgBuQZsfpv4Wk7camZnIJ1hOawdYTvsz7/BkA5aUkAEyEhHTBmazJ2 8qxYsYABOXg2QUS79kUy0x/ZOsQyFsO8y41cwPbhEXTW5pYvPq+g0zyaPKj23Q8e7jn6 ZoSw== X-Received: by 10.180.74.208 with SMTP id w16mr6119901wiv.31.1431000805246; Thu, 07 May 2015 05:13:25 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id g11sm3130903wjr.25.2015.05.07.05.13.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 05:13:24 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Brett Rudley , Arend van Spriel , "Franky (Zhenhui) Lin" , Hante Meuleman , brcm80211-dev-list@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] brcmfmac: check result of USB firmware request Date: Thu, 7 May 2015 14:13:03 +0200 Message-Id: <1431000783-17411-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This prevents silence failures with driver waiting (infinitely) for a callback. Signed-off-by: Rafa? Mi?ecki Acked-by: Arend van Spriel --- I don't really have any opinion if this should go for next or as a fix. --- drivers/net/wireless/brcm80211/brcmfmac/usb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index 5df6aa7..daba86d 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c @@ -1270,8 +1270,13 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) bus->chiprev = bus_pub->chiprev; /* request firmware here */ - brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), NULL, - brcmf_usb_probe_phase2); + ret = brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), + NULL, brcmf_usb_probe_phase2); + if (ret) { + brcmf_err("firmware request failed: %d\n", ret); + goto fail; + } + return 0; fail: