Thread (11 messages) flat view 11 messages, 5 authors, 2016-07-18
STALE3715d

[PATCH -next] iommu/exynos: Fix return value check in exynos_iommu_of_setup()

From: Wei Yongjun <hidden>
Date: 2016-07-07 02:50:35
Also in: linux-iommu, linux-samsung-soc

Hi,
just a question,
quoted
quoted
 	pdev = of_platform_device_create(np, NULL, platform_bus_type.dev_root);
-	if (IS_ERR(pdev))
-		return PTR_ERR(pdev);
+	if (!pdev)
+		return -ENOMEM;
 
 	/*
 	 * use the first registered sysmmu device for performing
is ENOMEM the right return value? of_platform_device_create()
doesn't fail only in case of malloc failure.

Shouldn't it be ENODEV instead, which might also mean with some
imagination that there is no memory available for that device?
Your are right, I will change the error to -ENODEV and resend the patch.

Thanks,
Wei Yongjun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help