Re: [PATCH v4] regulator: pfuze100: add pfuze100 regulator driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 22, 2013 at 06:39:36PM +0800, Robin Gong wrote:
> > > +static int pfuze_parse_regulators_dt(struct pfuze_chip *chip)
> > > +{
> > > +	struct device *dev = chip->dev;
> > > +	struct device_node *parent;
> > > +	int ret;
> > > +
> > > +	of_node_get(dev->parent->of_node);
> > > +	parent = of_find_node_by_name(dev->parent->of_node, "regulators");
> > > +	if (!parent) {
> > > +		dev_err(dev, "regulators node not found\n");
> > > +		return -EINVAL;
> > 
> > So you leave dev->parent->of_node unbalanced.
> > 
> Seems of_find_node_by_name will of_node_put the parent node.

Ah, yes.  I missed that.

Shawn

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux