From: Sachin Kamat Date: Wed, 3 Jul 2013 22:07:48 +0000 (-0700) Subject: drivers/rtc/rtc-da9052.c: use PTR_RET() X-Git-Tag: v3.11-rc1~99^2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11f54d05865c009a468e9d7adaa7414749daa6ca;p=profile%2Fivi%2Fkernel-x86-ivi.git drivers/rtc/rtc-da9052.c: use PTR_RET() Use of PTR_RET() simplifies the code. Signed-off-by: Sachin Kamat Cc: David Dajun Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index 2f7fdd77a6f..9c8c19441cc 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -249,10 +250,7 @@ static int da9052_rtc_probe(struct platform_device *pdev) rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &da9052_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc->rtc)) - return PTR_ERR(rtc->rtc); - - return 0; + return PTR_RET(rtc->rtc); } static struct platform_driver da9052_rtc_driver = {