From: Laxman Dewangan Date: Sun, 20 May 2012 16:18:49 +0000 (+0530) Subject: regulator: tps65910: dt: support when "regulators" node found X-Git-Tag: v3.5-rc1~177^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92ab953bd6477b816e8ddd2cf9eaed063332013a;p=profile%2Fcommon%2Fkernel-common.git regulator: tps65910: dt: support when "regulators" node found The device tree binding for the tps65910 is described as: tps65911 { reg = <0x2d> ::::::::: regulators { compatible = "ti,tps65911"; ldo1_reg: ldo1 { /** regulator entry */ }; ldo2_reg: ldo2 { /** regulator entry */ }; :::::::::: }; }; Support the regulators functionality only when there is "regulators" child node available for tps65910. Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 11af48e..8b31f07 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c @@ -1090,6 +1090,10 @@ static struct tps65910_board *tps65910_parse_dt_reg_data( } regulators = of_find_node_by_name(np, "regulators"); + if (!regulators) { + dev_err(&pdev->dev, "regulator node not found\n"); + return NULL; + } switch (tps65910_chip_id(tps65910)) { case TPS65910: