]> git.baikalelectronics.ru Git - kernel.git/commit
pps: return PTR_ERR on error in device_create
authorEmil Goode <emilgoode@gmail.com>
Mon, 30 Jul 2012 21:42:51 +0000 (14:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 Jul 2012 00:25:21 +0000 (17:25 -0700)
commit2fa86fb1afd54b4811a5991ac3dfb61cd556b252
tree973d6e63af978ae1fdafdf6ec273cafaf0a2eb35
parent9743b97034688208323df99e9a468064d10fd9eb
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pps/pps.c