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

Commit 76c3f98b authored by Manohar Vavilapalli's avatar Manohar Vavilapalli
Browse files

pinctrl: qcom: Add NULL check before using pointer Prop



Add NULL check to avoid potential NULL pointer dereference.

Change-Id: I9d061e846d23709b1e5a8850a2414c77a39a20d1
Signed-off-by: default avatarManohar Vavilapalli <mvavilap@codeaurora.org>
parent 2f49ba7e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, 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
@@ -1980,6 +1980,8 @@ static int sm8150_pinctrl_dir_conn_probe(struct platform_device *pdev)

	prop = of_get_property(pdev->dev.of_node, "dirconn-list",
			&length);
	if (!prop)
		return -ENOENT;

	dir_conn_length = length / sizeof(u32);