]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: android: ion_test: fix check of platform_device_register_simple() error...
authorVladimir Zapolskiy <vz@mleia.com>
Tue, 22 Mar 2016 22:38:43 +0000 (00:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:08:48 +0000 (09:08 -0700)
commit263b0af7cc419a6f5254269a30e9784b5476f433
treeda2fb5cdffd05990d3d2bbe86755acdee58b04f7
parenta5e8deb7f07fb8f7d34c908dea303ba948752916
staging: android: ion_test: fix check of platform_device_register_simple() error code

commit ccbc2a9e7878ff09bcaed4893c2a2d3adbb797e2 upstream.

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")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_test.c