Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5281461rwb; Mon, 31 Jul 2023 23:06:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlEfnDMr8kbfh8sDvj5MZ4e4qnuxb0S9RiR+7TeHsWJGNVZA/439Jeomhz9svHnQ6Dy9pOYD X-Received: by 2002:a05:6871:612:b0:1bb:84af:bf8f with SMTP id w18-20020a056871061200b001bb84afbf8fmr14597133oan.58.1690869968120; Mon, 31 Jul 2023 23:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690869968; cv=none; d=google.com; s=arc-20160816; b=r/bqDJT2pk+s3dzsU9KGTZYyvA7UzvLIXhbsjj2lpj++aopCqULot3ASAMk+pTaphR U8A4N8/7UrFSlN995JNip7x5ix0of0urB2JqLgqRh+5cZH2sGBm3Nc/T7UXZ3ZItUmFl arrA0+JFRk91pvos8Vg5ege26hN4s4c5QYn74quBhLqJpfVkJtiNPqnlN8Z+e/5LN5FZ ydaBqpmnsFgOtneikoaCDzZ2M98jOLa5CawBSkXwPqM8Z/vN8M/kOc97d51bx4sNnxmK G8YhDlHM/OMdMOHkz726tbh8yPkFD0vHJpOQwK267CGEbn46fGQ9/W8d09p9HYpQb6Ed s9vg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GSsKorbx5RHJKMUhD6krP0e+LaWLX/fDEBFkpcT41kY=; fh=B6NRqkP7H2f/6hGUq4XZ1bcu8tCBRUaRe/xed2j1WFQ=; b=eDh2LkQWQYmKOD1IwXr0u1ziSS4bNe2f7+FMHwj8w3lP6ss18I0sBx279Y9XRprZkU 4QW4Pl5ElYE4iHBQTALCj5tjwG3PsSCSMBsaQPnJlM2cZ7YZf0oWZqKYj6SPSXg/pHUQ PHk13W2lrkJAJ2RCV0+zrPP+mJRZu5ebvF7dN7PDN6YNrSKbf6vZUn/9ULXR0VTCoh3x eRXshrgPvgcQhYf+8Yve5YQJIB7kDhCeQy+UnWko9pkCMI+Sk8PiEUIn7U+tBL6PjZQU GF6Rwz9kgfiFIGTvMCbCo3+tYogKtIvgGmiJ91cywbFfg0HzGNKgNi+7KyL/lK2VKVGp xEpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=pitjjJdC; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a63d043000000b00563814df056si6525101pgi.38.2023.07.31.23.05.57; Mon, 31 Jul 2023 23:06:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=pitjjJdC; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbjHAFAN (ORCPT + 59 others); Tue, 1 Aug 2023 01:00:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjHAFAL (ORCPT ); Tue, 1 Aug 2023 01:00:11 -0400 Received: from forward102a.mail.yandex.net (forward102a.mail.yandex.net [178.154.239.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 654051FC0 for ; Mon, 31 Jul 2023 22:00:08 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0f:170e:0:640:d60c:0]) by forward102a.mail.yandex.net (Yandex) with ESMTP id CCD7446D44; Tue, 1 Aug 2023 08:00:05 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 40Ji1unDfW20-sjL1kzYh; Tue, 01 Aug 2023 08:00:05 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1690866005; bh=GSsKorbx5RHJKMUhD6krP0e+LaWLX/fDEBFkpcT41kY=; h=Message-ID:Date:Cc:Subject:To:From; b=pitjjJdCXYp1+L3VCuu2u/HU1W9x6ovyToYbq4xa8+/L03n0c8W4ILQ8j3wlI1QB5 AULqhbDgog3K2yjD8S/uWEwu/ow407fXaOVCHvvXUuQ69Bi9vtVMxKrn+qLfoO+d89 td7OwGiIkJXJA610tq4S9Gd4eiyzA7FN+xhJAU6I= Authentication-Results: mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Felix Fietkau Cc: Kalle Valo , linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, Dmitry Antipov Subject: [PATCH 1/4] wifi: mt76: handle possible error returned by sdio_set_host_pm_flags() Date: Tue, 1 Aug 2023 07:57:20 +0300 Message-ID: <20230801050000.18864-1-dmantipov@yandex.ru> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In 'mt7663s_suspend()', drop nested declaration of 'err' and handle possible error returned by 'sdio_set_host_pm_flags()'. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov --- drivers/net/wireless/mediatek/mt76/mt7615/sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c index fc547a0031ea..6607577d22cf 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c @@ -188,14 +188,14 @@ static int mt7663s_suspend(struct device *dev) if (!test_bit(MT76_STATE_SUSPEND, &mdev->mphy.state) && mt7615_firmware_offload(mdev)) { - int err; - err = mt76_connac_mcu_set_hif_suspend(&mdev->mt76, true); if (err < 0) return err; } - sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); + err = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); + if (err) + return err; err = mt7615_mcu_set_fw_ctrl(mdev); if (err) -- 2.41.0