Search Linux Wireless

[PATCH 1/4] wifi: mt76: handle possible error returned by sdio_set_host_pm_flags()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <dmantipov@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux