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

Commit 151886e2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "regulator: msm_gfx_ldo: fix null pointer dereference"

parents 74c5b0b9 779a2810
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 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
@@ -764,6 +764,9 @@ static int msm_gfx_ldo_adjust_init_voltage(struct msm_gfx_ldo *ldo_vreg)

	volt_adjust = devm_kcalloc(ldo_vreg->dev, size, sizeof(*volt_adjust),
								GFP_KERNEL);
	if (!volt_adjust)
		return -ENOMEM;

	rc = of_property_read_u32_array(of_node, prop_name, volt_adjust, size);
	if (rc) {
		pr_err("failed to read %s property rc=%d\n", prop_name, rc);