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

Commit b07050a4 authored by Arun KS's avatar Arun KS
Browse files

esoc: mdm-4x: Fix potential NULL pointer dereference



NULL pointer dereference can happen with debug register
addresses. Fix this by adding a NULL check.

Change-Id: I25e93d69129278bae9a8490d781e660eaefcccd5
Signed-off-by: default avatarArun KS <arunks@codeaurora.org>
parent f01c0978
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 2017, 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
@@ -499,7 +499,7 @@ static void mdm_configure_debug(struct mdm_ctrl *mdm)
	struct device_node *node = mdm->dev->of_node;

	addr = of_iomap(node, 0);
	if (IS_ERR(addr)) {
	if (IS_ERR_OR_NULL(addr)) {
		dev_err(mdm->dev, "failed to get debug base addres\n");
		return;
	}