smartpqi fix static checker issues
Status from this message: Applied to 5.13/scsi-staging, thanks!
Get series with b4
b4 am 161850488487.7302.7018870513204678832.stgit@brunhildaVersions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | smartpqi: fix blocks_per_row static checker issuedrivers/ | +6 | 0 replies | |
| 2/2 | smartpqi: fix device pointer variable reference static checker issuedrivers/ | +1 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Scott Benesh | Scott Teel | Mike McGowen | Kevin Barnett |
|---|---|---|---|---|
| 1/2 | R-b | R-b | R-b | R-b |
| 2/2 | R-b | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/2] smartpqi fix static checker issues
These patches are based on Martin Peterson's 5.13/scsi-queue tree
This set corrects two static checker warnings found by Dan Carpenter <[email protected]>
smartpqi-fix-blocks_per_row-static-checker-issue
Using rmd->blocks_per_row as a divisor without checking it for 0 first.
The variable blocks_per_row is used as a divisor in many raid_map calculations. This can lead to a divide by 0. This patch prevents a possible divide by 0. If the member is 0, return PQI_RAID_BYPASS_INELIGIBLE before any division is performed. The current check for a non-0 value was after multiple divisions were performed.
smartpqi-fix-device-pointer-variable-reference
drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95)
In function pqi_sas_port_add_rphy there is a pointer dereference without a check for NULL value. Correct this by moving the pointer dereference after the check for non-NULL value.
Note: I could not find the e-mail for
smartpqi-fix-device-pointer-variable-reference issue in lore.kernel.org so I used mail-archive.com.
It may have not been forwarded to lore.kernel.org. Not sure.
---
Don Brace (2):
smartpqi: fix blocks_per_row static checker issue
smartpqi: fix device pointer variable reference static checker issue
drivers/scsi/smartpqi/smartpqi_sas_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--
Signature