Hi Stephen, > -----Original Message----- > From: Stephen Warren [mailto:swarren@xxxxxxxxxxxxx] > Sent: Tuesday, June 18, 2013 9:23 PM > To: J, KEERTHY > Cc: linux-omap@xxxxxxxxxxxxxxx; broonie@xxxxxxxxxx; > ldewangan@xxxxxxxxxx; sameo@xxxxxxxxxxxxxxx; grant.likely@xxxxxxxxxxxx; > swarren@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux- > doc@xxxxxxxxxxxxxxx; gg@xxxxxxxxxxxxxxx > Subject: Re: [PATCH v2 2/4] MFD: Palmas: Add SMPS10_BOOST feature > > On 06/18/2013 04:03 AM, J Keerthy wrote: > > The SMPS10 regulator is not presesnt in all the variants of the > PALMAS > > PMIC family. Hence adding a feature to distingush between them. > > > diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c > > > + match = of_match_device(of_match_ptr(of_palmas_match_tbl), > > +&i2c->dev); > > + > > + if (match) { > > + features = (unsigned int *)match->data; > > + palmas->features = *features; > > + } else { > > + return -ENODATA; > > + } > > > I think it's more common to do the error-checking first. That way, the > success-case code doesn't need an indent: > > match = of_match...(...); > if (!match) > return -ENODATA; > > features = ...; > palmas->features = *features; Sure. I will fix this. Regards, Keerthy -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html