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

Commit f9d5c3c6 authored by Abhimanyu Kapur's avatar Abhimanyu Kapur Committed by Devesh Jhunjhunwala
Browse files

clk: msm: msm-clock-controller: check for null along with error



While parsing the device tree node, perform a null check
along with the error check by substituting IS_ERR with
IS_ERR_OR_NULL on the parser pointer.

CRs-Fixed: 971705
Change-Id: Id91981be0cdc135099b8e3d9866549268ab237a3
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
parent a3883c35
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014, 2016, 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
@@ -455,7 +455,7 @@ void *msmclk_parse_dt_node(struct device *dev, struct device_node *np)
	}

	parser = msmclk_parser_lookup(np);
	if (IS_ERR(parser)) {
	if (IS_ERR_OR_NULL(parser)) {
		dt_err(np, "no parser found\n");
		return ERR_PTR(-EINVAL);
	}