Skip to contentSkip to conversation

staging: android: ion: tegra: Replace IS_ERR_OR_NULL with IS_ERR

PATCH New Amitoj Kaur Chawla 1 participant 1 message Feb 25, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: android: ion: tegra: Replace IS_ERR_OR_NULL with IS_ERR

Replace IS_ERR_OR_NULL test with an IS_ERR test since ion_device_create() function returns a valid device or a -PTR_ERR only as evidenced by the comment on the function prototype.

---
 drivers/staging/android/ion/tegra/tegra_ion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/tegra/tegra_ion.c +1 -1
index 8828524..49e55e5 100644
@@ -37,7 +37,7 @@ static int tegra_ion_probe(struct platform_device *pdev)
 			     sizeof(struct ion_heap *), GFP_KERNEL);
 
 	idev = ion_device_create(NULL);
-	if (IS_ERR_OR_NULL(idev))
+	if (IS_ERR(idev))
 		return PTR_ERR(idev);
 
 	/* create the heaps as specified in the board file */
Signature · 1 line
1.9.1