Commit:     29dd0dae507f73f305aaea765f975eafd1fa5493
Parent:     9c88b6ba1c72a8bba30347b63f1531f2d9c2a309
Author:     Paul Mundt <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 14:58:09 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Wed Nov 7 14:58:09 2007 +0900

    rtc: sh-rtc: Handle rtc_device_register() failure properly.
    Currently if rtc_device_register() fails we have an IS_ERR() on
    the wrong pointer, which causes this to always be skipped. Fix
    this up to actually check the right pointer. The return value
    was always correct, even though the check was wrong.
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
 drivers/rtc/rtc-sh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index 78277a1..61caed5 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -588,7 +588,7 @@ static int __devinit sh_rtc_probe(struct platform_device 
        rtc->rtc_dev = rtc_device_register("sh", &pdev->dev,
                                           &sh_rtc_ops, THIS_MODULE);
-       if (IS_ERR(rtc)) {
+       if (IS_ERR(rtc->rtc_dev)) {
                ret = PTR_ERR(rtc->rtc_dev);
                goto err_badmap;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to