From: Mark Brown Date: Thu, 24 Oct 2013 10:11:41 +0000 (+0100) Subject: Merge remote-tracking branch 'regulator/topic/ti-abb' into regulator-next X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=07afa93e3190b16d14afa0cd6a208ef21f157e6e;p=linux-beck.git Merge remote-tracking branch 'regulator/topic/ti-abb' into regulator-next --- 07afa93e3190b16d14afa0cd6a208ef21f157e6e diff --cc drivers/regulator/ti-abb-regulator.c index 20aab8f90e08,1e0280536e72..b187b6bba7ad --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c @@@ -767,9 -765,16 +767,14 @@@ static int ti_abb_probe(struct platform pname = "ldo-address"; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pname); + if (!res) { + dev_dbg(dev, "Missing '%s' IO resource\n", pname); + ret = -ENODEV; + goto skip_opt; + } abb->ldo_base = devm_ioremap_resource(dev, res); - if (IS_ERR(abb->ldo_base)) { - ret = PTR_ERR(abb->ldo_base); - goto err; - } + if (IS_ERR(abb->ldo_base)) + return PTR_ERR(abb->ldo_base); /* IF ldo_base is set, the following are mandatory */ pname = "ti,ldovbb-override-mask";