mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
gpio: tegra: return -ENOMEM on allocation failure in probe
devm_kzalloc() failure in tegra_gpio_probe() returns -ENODEV, which indicates "no such device". The correct error code for a memory allocation failure is -ENOMEM. Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> Link: https://patch.msgid.link/20260409185853.2163034-1-samasth.norway.ananda@oracle.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
1561d96f5f
commit
57df6923ca
|
|
@ -698,7 +698,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
|
|||
|
||||
tgi = devm_kzalloc(&pdev->dev, sizeof(*tgi), GFP_KERNEL);
|
||||
if (!tgi)
|
||||
return -ENODEV;
|
||||
return -ENOMEM;
|
||||
|
||||
tgi->soc = of_device_get_match_data(&pdev->dev);
|
||||
tgi->dev = &pdev->dev;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user