From 9a79e0a8c3552b3ca8e3d61fcd622b96ef0bbf5d Mon Sep 17 00:00:00 2001 From: Choi Jaehyoung Date: Thu, 7 Sep 2017 14:01:16 +0900 Subject: [PATCH] [COMMON] watchdog: s3c_2410_wdt: Fix prevent defect. CID: 197431 - Pointer to local outside scope. Change-Id: I64b39e2d0660e6a51611e4ebe1c01f1fc45b4e86 Signed-off-by: Choi Jaehyoung --- drivers/watchdog/s3c2410_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index abeec8bd6b8a..90b1c1d3c43d 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -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); -- 2.20.1