Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp261288pxx; Wed, 28 Oct 2020 04:23:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3Uj9U5rTIyJ19nXuQ+kh6XNtd6oUnnJzPpzhmNyZ9FIUoa6LBm+bFOrpuDXIU+y3zosMU X-Received: by 2002:a05:6402:14c1:: with SMTP id f1mr7332992edx.220.1603884218010; Wed, 28 Oct 2020 04:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603884218; cv=none; d=google.com; s=arc-20160816; b=Xns1ZEuRjKb3j2dwLbLDl6EWsWXCptDIxusJM5+ADrRT5i+T9YKSkuVokr62i3bC54 QP2zvd3mmFFs2Qc+GdoDa5ROsmaeIYbhw1o22fk4WV02pqxumLgsRnZgZBUngyibT3mb LdEdCZijxzyjpeD0iEVW3DnIiXM5hiG4xyWXsbmSxsUWKp7VsLO5OmdozrmXBePe4IaK Uk81oEHhDeA/mfSsqcvjAlr8RrxjQZHEFnYisBwWf7OIl9CvLWPGxha4C/ZufMHfMQpS iwVvM2qUN4RbzTQMilsWQZBKOqhUumRjdptet9LHZX30duG34dTphI8YQvdMicsx+jIU 0NfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/RPT+UQm5RdlRR0B+VE28zXbSj7rb89a+cQc9yBlo9I=; b=hF3m27hANK/XlIiCCIURJ6V10+Hf6V+ce+sJZl6IiQH3Q8mwADEONBDnk9oUw3pEff DWGzbRy/axJPMysB0ycSYf876k92mDHsEJiGDaF6YqObjbGLAk9/2ON6r9bA8Y52IbLl 7ZYNerqPMNX2mokfxMaCpZA7Pt3e/R98Sg3mTFpU5/YCPC2b1pNgWYFyBWVwvAE23BVm 2OjjPZwLON3YwM6RoEMTCeLR4NbBFYGHJyUaLgeRfwKS3CpXD0KwAnvScwStYge0b+IU E3Wu63ljjZoNzcE7CrsMsyWAHwfgWiF05tjJdS0RZ84gp25RTvZmrJVbotTSYO25ZlZy Cnkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d4PgUONL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si2705925ejr.482.2020.10.28.04.23.15; Wed, 28 Oct 2020 04:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d4PgUONL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1789684AbgJ0PCa (ORCPT + 99 others); Tue, 27 Oct 2020 11:02:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:60992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1784633AbgJ0O7W (ORCPT ); Tue, 27 Oct 2020 10:59:22 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2EB2522281; Tue, 27 Oct 2020 14:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810761; bh=g5HYlZAFR8vdmZXgm+EELCOCg9TihOKXkvdXaIJmOJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d4PgUONLysLrySIP2YvKsSnSMEiZGlQxH8ANiIUxVfT7sYWjHrkkTU7q52o/PG+Q1 etvUJDjC/ccNQ+3cc7WdX8ZMreAL7Z0j3d5nmMjt39+cmKmMyZYuyKuiJxbqSuQv7h bn1V80gCWvOsLd9Juex3fi0eaSWacJ/rfC4ZO4RQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bo YU , Kalle Valo , Sasha Levin Subject: [PATCH 5.8 255/633] ath11k: Add checked value for ath11k_ahb_remove Date: Tue, 27 Oct 2020 14:49:58 +0100 Message-Id: <20201027135534.626700379@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bo YU [ Upstream commit 80b892fc8a90e91498babf0f6817139e5ec64b5c ] Return value form wait_for_completion_timeout should to be checked. This is detected by Coverity: #CID:1464479 (CHECKED_RETURN) Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Bo YU Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200621095136.7xdbzkthoxuw2qow@debian.debian-2 Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/ahb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 30092841ac464..a0314c1c84653 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -981,12 +981,16 @@ static int ath11k_ahb_probe(struct platform_device *pdev) static int ath11k_ahb_remove(struct platform_device *pdev) { struct ath11k_base *ab = platform_get_drvdata(pdev); + unsigned long left; reinit_completion(&ab->driver_recovery); - if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags)) - wait_for_completion_timeout(&ab->driver_recovery, - ATH11K_AHB_RECOVERY_TIMEOUT); + if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags)) { + left = wait_for_completion_timeout(&ab->driver_recovery, + ATH11K_AHB_RECOVERY_TIMEOUT); + if (!left) + ath11k_warn(ab, "failed to receive recovery response completion\n"); + } set_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags); cancel_work_sync(&ab->restart_work); -- 2.25.1