From patchwork Tue Apr 9 19:08:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 10891945 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-2.web.codeaurora.org (Postfix) with ESMTP id 933951800 for ; Tue, 9 Apr 2019 19:13:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81A652880D for ; Tue, 9 Apr 2019 19:13:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75FEA28938; Tue, 9 Apr 2019 19:13:16 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 338D52893A for ; Tue, 9 Apr 2019 19:13:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbfDITNP (ORCPT ); Tue, 9 Apr 2019 15:13:15 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36100 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbfDITNO (ORCPT ); Tue, 9 Apr 2019 15:13:14 -0400 Received: by mail-lj1-f193.google.com with SMTP id r24so3765698ljg.3 for ; Tue, 09 Apr 2019 12:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3jf7/3Wcpi0foIcFTrOIi7geeJuAbQU85kMpO8kay/o=; b=rAnTJJIUQ9lxjUTBnu3mbOvLRNJ7une05H3PUjGOLeXnVdcW091vW6AEz13kU64D5n C3TFZZjuGMazpeB65t9DE4htgAFSrQczvyG3PtRGF67jzpo0OJkFsMh+lASn2P6dhH1G s2gIyq8VG7CEPc6I6GOHc2NT5kPl+41INmdid/KcaM7llEHooQ7enZlJI13uiqGdaJGb 4Ao8868JjNZPk4p01BEv0a5VB/KErYMF53i2F1M0bYSRf8vhEQ68VRaDlmntl7p52rqC OT3/RCj3NO71fUSycwNwJRomD9MFjAzhlZoXZWFNT/b4aMI8hHGFWbFidDQIBvRq2Xpc 2AGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3jf7/3Wcpi0foIcFTrOIi7geeJuAbQU85kMpO8kay/o=; b=XoSJnggwhUMhGcyrXXSfhDc1hBpqKPFGgA6UQHfIVhpUvSio7VGE8IHLyGIxfymkdA s6rdLaXWB/6bcM8e7K1uk0s0OvyYokP7cE5v4VXJ0wRFfZkiwfBHcMpSyd0kwPaYXiXQ KZ1tv/QUmjsXNzdDfkQHh0bNt1wZPkiqhrx3p6+8AXRNzTP4WBPj+61e8mBdY2DS4u/a RtuZNQeaFQj8AyBV6ZuWSrB6zgLQmtrm+zjnWzGbOkN7fWMK8aYletHGMo/p/S9ZOLOH 04EqFLvWK4rizaXO0o/OJ0mhIXOHcZiQuKZCIXqyy+TCLUr3mI31Vu+9SOxzMD1qoKYg ojvQ== X-Gm-Message-State: APjAAAXejOF1N7Phl9bDJUZTEVUeGR33gu0LqUc5zFaGIO1R9L2GHDvE Me6FnNokoVAl8wtZJ3duvpmCpBky X-Google-Smtp-Source: APXvYqzseMVHi/zp2dLhKoFEYoelUgs68BX8p1VKuSrL/qFlGOzWDIE/FmiHVhECZY05srrr6gZpQw== X-Received: by 2002:a2e:2e04:: with SMTP id u4mr11410205lju.37.1554837192057; Tue, 09 Apr 2019 12:13:12 -0700 (PDT) Received: from localhost.localdomain (81-233-89-221-no75.tbcn.telia.com. [81.233.89.221]) by smtp.gmail.com with ESMTPSA id q64sm6807848ljq.76.2019.04.09.12.13.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 12:13:11 -0700 (PDT) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Cc: Erik Stromdahl Subject: [PATCH 5/6] ath10k: sdio: add missing error check Date: Tue, 9 Apr 2019 21:08:50 +0200 Message-Id: <20190409190851.4557-6-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190409190851.4557-1-erik.stromdahl@gmail.com> References: <20190409190851.4557-1-erik.stromdahl@gmail.com> MIME-Version: 1.0 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 Although not likely, the bundle allocation might fail. Add proper error check and warning print. Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/sdio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 295e1e7ec3b0..3eb241cb8a25 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -586,6 +586,11 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar, act_len, &bndl_cnt); + if (ret) { + ath10k_warn(ar, "alloc_bundle error %d\n", ret); + goto err; + } + n_lookaheads += bndl_cnt; i += bndl_cnt; /*Next buffer will be the last in the bundle */