Skip to content

Commit 2c8294c

Browse files
krzklag-linaro
authored andcommitted
mfd: as3722: Fix wakeup source leaks on device unbind
Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-2-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 6d0b239 commit 2c8294c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mfd/as3722.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ static int as3722_i2c_probe(struct i2c_client *i2c)
394394
return ret;
395395
}
396396

397-
device_init_wakeup(as3722->dev, true);
397+
ret = devm_device_init_wakeup(as3722->dev);
398+
if (ret)
399+
return dev_err_probe(as3722->dev, ret, "Failed to init wakeup\n");
398400

399401
dev_dbg(as3722->dev, "AS3722 core driver initialized successfully\n");
400402
return 0;

0 commit comments

Comments
 (0)