mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
staging: nvec: nvec_power: use GFP_KERNEL in probe()
nvec_power_probe() calls devm_kzalloc() with GFP_NOWAIT, which disables direct reclaim and is meant for atomic context. probe() runs in normal process context and may sleep, so this needlessly risks a spurious -ENOMEM under memory pressure instead of just waiting for reclaim like every other probe() allocation does. nvec.c's own tegra_nvec_probe() already uses GFP_KERNEL for the identical pattern, confirming this is an oversight, not intentional. Signed-off-by: Igor Putko <[email protected]> Acked-by: Marc Dietrich <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
6a755a616d
commit
33da57cc4a
1 file changed
+1
-1
@@ -377,7 +377,7 @@ static int nvec_power_probe(struct platform_device *pdev)
|
||||
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
|
||||
struct power_supply_config psy_cfg = {};
|
||||
|
||||
power = devm_kzalloc(&pdev->dev, sizeof(struct nvec_power), GFP_NOWAIT);
|
||||
power = devm_kzalloc(&pdev->dev, sizeof(struct nvec_power), GFP_KERNEL);
|
||||
if (!power)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in new issue
Block a user