Re: [PATCH v2 4/4] hwmon: (asus_rog_ryujin) Handle missing driver data
From: Guenter Roeck
Date: Tue Aug 11 2026 - 22:00:42 EST
On 8/11/26 16:39, Arie Miller wrote:
Handles an issue reported by Sashiko where an id could
be missing driver_data.
Link: https://lore.kernel.org/r/5a817284-a9f4-48b2-9f0f-802c5dc6963c@xxxxxxxxxxxx
Assisted-by: Codex:gpt-5.6-sol sparse
Signed-off-by: Arie Miller <renari@xxxxxxxxxx>
---
drivers/hwmon/asus_rog_ryujin.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hwmon/asus_rog_ryujin.c b/drivers/hwmon/asus_rog_ryujin.c
index 9b34c6e06bf7..702edb831394 100644
--- a/drivers/hwmon/asus_rog_ryujin.c
+++ b/drivers/hwmon/asus_rog_ryujin.c
@@ -506,6 +506,9 @@ static int rog_ryujin_probe(struct hid_device *hdev, const struct hid_device_id
struct rog_ryujin_data *priv;
int ret;
+ if (!id->driver_data)
+ return -EINVAL;
+
This will need to be part of the first patch of the series.
Guenter
priv = devm_kzalloc(&hdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;