Skip to contentSkip to conversation

mt76: mt7921: fix warning Using plain integer as NULL pointer

PATCH New Deren Wu 1 participant 1 message Jun 5, 2022 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Deren Wu

author
#1 lore raw

PATCH 1/1 mt76: mt7921: fix warning Using plain integer as NULL pointer

From: Deren Wu <[email protected]>

Changed "0 to NULL" to avoid below sparse warnings .../mt76/mt7921/acpi_sar.c:64:68: sparse: Using plain integer as NULL pointer

Fixes ab79a7d7a96f ("mt76: mt7921: introduce ACPI SAR support")
---
 drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c +1 -1
index fb3d31b96682..be4f07ad3af9 100644
@@ -61,7 +61,7 @@ mt7921_acpi_read(struct mt7921_dev *dev, u8 *method, u8 **tbl, u32 *len)
 static int
 mt7921_asar_acpi_read_mtcl(struct mt7921_dev *dev, u8 **table, u8 *version)
 {
-	*version = (mt7921_acpi_read(dev, MT7921_ACPI_MTCL, table, 0) < 0)
+	*version = (mt7921_acpi_read(dev, MT7921_ACPI_MTCL, table, NULL) < 0)
 		   ? 1 : 2;
 	return 0;
 }
Signature · 1 line
2.18.0