[COMMON] watchdog: s3c_2410_wdt: Fix prevent defect.
authorChoi Jaehyoung <jkkkkk.choi@samsung.com>
Thu, 7 Sep 2017 05:01:16 +0000 (14:01 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Wed, 9 May 2018 11:27:48 +0000 (20:27 +0900)
CID: 197431 - Pointer to local outside scope.

Change-Id: I64b39e2d0660e6a51611e4ebe1c01f1fc45b4e86
Signed-off-by: Choi Jaehyoung <jkkkkk.choi@samsung.com>
drivers/watchdog/s3c2410_wdt.c

index abeec8bd6b8a7fa26627399126855fcaaa873f4b..90b1c1d3c43db67258462cfcb4d00e63d0e6e1f3 100644 (file)
@@ -803,7 +803,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 
        if (of_property_read_u32(dev->of_node, "index", &cluster_index)) {
                dev_err(dev, "Watchdog cluster index lookup failed.\n");
-               return PTR_ERR(&cluster_index);
+               return -EINVAL;
        }
        dev_info(dev, "watchdog cluster%d probe\n", cluster_index);