Subject: Coverity: rtw8822c_dpk_cal_coef1(): Error handling issues

From: coverity-bot <[email-masked]>
Date: Fri, 24 Apr 2020 08:26:14 -0700

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20200424 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Mon Sep 9 15:16:08 2019 +0800
    5227c2ee453d ("rtw88: 8822c: add SW DPK support")

Coverity reported the following:

*** CID 1492716:  Error handling issues  (CHECKED_RETURN)
/drivers/net/wireless/realtek/rtw88/rtw8822c.c: 3147 in rtw8822c_dpk_cal_coef1()
3141
3142     	rtw_write32_mask(rtwdev, REG_NCTL0, BIT_SUBPAGE, 0x0000000c);
3143     	rtw_write32(rtwdev, REG_RXSRAM_CTL, 0x000000f0);
3144     	rtw_write32(rtwdev, REG_NCTL0, 0x00001148);
3145     	rtw_write32(rtwdev, REG_NCTL0, 0x00001149);
3146
vvv     CID 1492716:  Error handling issues  (CHECKED_RETURN)
vvv     Calling "check_hw_ready" without checking return value (as is done elsewhere 20 out of 21 times).
3147     	check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55);
3148
3149     	rtw_write8(rtwdev, 0x1b10, 0x0);
3150     	rtw_write32_mask(rtwdev, REG_NCTL0, BIT_SUBPAGE, 0x0000000c);
3151
3152     	for (path = 0; path < rtwdev->hal.rf_path_num; path++) {

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <[email-masked]>
Addresses-Coverity-ID: 1492716 ("Error handling issues")
Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support")

Thanks for your attention!

-- 
Coverity-bot