Commit 57df6923 authored by Samasth Norway Ananda's avatar Samasth Norway Ananda Committed by Bartosz Golaszewski
Browse files

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: default avatarSamasth Norway Ananda <samasth.norway.ananda@oracle.com>
Link: https://patch.msgid.link/20260409185853.2163034-1-samasth.norway.ananda@oracle.com


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
parent 1561d96f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;