mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
[ Upstream commit8d7e62d5e9] Out of memory situation on driver's probe is expected to be reported to the driver's framework with a proper -ENOMEM error code. Fixes:35570ac603("gpio: add GPIO driver for the Timberdale FPGA") Signed-off-by: Vladimir Zapolskiy <vz@kernel.org> Link: https://patch.msgid.link/20260630145148.4081967-1-vz@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fb978d7205
commit
1bc19683c8
@@ -228,7 +228,7 @@ static int timbgpio_probe(struct platform_device *pdev)
|
||||
|
||||
tgpio = devm_kzalloc(dev, sizeof(*tgpio), GFP_KERNEL);
|
||||
if (!tgpio)
|
||||
return -EINVAL;
|
||||
return -ENOMEM;
|
||||
|
||||
tgpio->irq_base = pdata->irq_base;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user