]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pps: return PTR_ERR on error in device_create
authorEmil Goode <emilgoode@gmail.com>
Sat, 21 Jul 2012 00:55:14 +0000 (10:55 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:53:30 +0000 (13:53 +1000)
commita643d5d2b21f71a4d68997050d5a4552ce151c35
treed9942226de11a549330528cbbe8edabb3fdf5a09
parent1ea3afd900eb1535c8f734c1d56e3c3c4c5ff3f2
pps: return PTR_ERR on error in device_create

We should return PTR_ERR if the call to the device_create function fails.
Without this patch we instead return the value from a successful call to
cdev_add if the call to device_create fails.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Devendra Naga <devendra.aaru@gmail.com>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/pps/pps.c