rtc: rtc-davinci: return correct error code if rtc_device_register() fails
authorDevendra Naga <devendra.aaru@gmail.com>
Tue, 18 Dec 2012 00:02:39 +0000 (16:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 01:15:21 +0000 (17:15 -0800)
commit9ed39bf931cbd95b30755dcb1ad724fe05565c3f
treefff3e08eecd61f1494258a5a57a5a9106dd9535b
parent32c4746c24728a047a1ef985215edec798bfce1f
rtc: rtc-davinci: return correct error code if rtc_device_register() fails

rtc_device_register() returns a pointer containing error code in case
of error.  Use that in the error return.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-davinci.c