Skip to contentSkip to conversation

patch "staging: android: ion_test: fix check of" added to staging-linus

PATCH [email protected] 1 participant 1 message Mar 23, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

staging: android: ion_test: fix check of

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From ccbc2a9e7878ff09bcaed4893c2a2d3adbb797e2 Mon Sep 17 00:00:00 2001

From: Vladimir Zapolskiy <[email protected]>
Date: Wed, 23 Mar 2016 00:38:43 +0200
Subject: staging: android: ion_test: fix check of
platform_device_register_simple() error code

On error platform_device_register_simple() returns ERR_PTR() value, check for NULL always fails. The change corrects the check itself and propagates the returned error upwards.

Fixes 81fb0b901397 ("staging: android: ion_test: unregister the platform device")
Cc stable <[email protected]>
---
 drivers/staging/android/ion/ion_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_test.c +2 -2
index da34bc12cd7c..83a3af06d01c 100644
@@ -285,8 +285,8 @@ static int __init ion_test_init(void)
 {
 	ion_test_pdev = platform_device_register_simple("ion-test",
 							-1, NULL, 0);
-	if (!ion_test_pdev)
-		return -ENODEV;
+	if (IS_ERR(ion_test_pdev))
+		return PTR_ERR(ion_test_pdev);
 
 	return platform_driver_probe(&ion_test_platform_driver, ion_test_probe);
 }
Signature · 1 line
2.7.4