Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d79e5b49 authored by Aparna Das's avatar Aparna Das
Browse files

msm: watchdog-v2: handle error condition when getting resource



Check for error condition when getting data out of resource array
for watchdog in order to exit gracefully in case of error.

Change-Id: Ib5f48891c76461f9eb0726d48b7aa2e1e6845f7c
Signed-off-by: default avatarAparna Das <adas@codeaurora.org>
parent 1e9cff42
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -476,6 +476,8 @@ static int msm_wdog_dt_to_pdata(struct platform_device *pdev,
	int ret;

	wdog_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!wdog_resource)
		return -ENODEV;
	pdata->size = resource_size(wdog_resource);
	pdata->phys_base = wdog_resource->start;
	if (unlikely(!(devm_request_region(&pdev->dev, pdata->phys_base,