From: Choi Jaehyoung Date: Thu, 7 Sep 2017 05:01:16 +0000 (+0900) Subject: [COMMON] watchdog: s3c_2410_wdt: Fix prevent defect. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9a79e0a8c3552b3ca8e3d61fcd622b96ef0bbf5d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [COMMON] watchdog: s3c_2410_wdt: Fix prevent defect. CID: 197431 - Pointer to local outside scope. Change-Id: I64b39e2d0660e6a51611e4ebe1c01f1fc45b4e86 Signed-off-by: Choi Jaehyoung --- 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);