9 Dec
2016
9 Dec
'16
7:56 a.m.
On Thu, Dec 08, 2016 at 08:48:49PM -0200, Fabio Estevam wrote:
On Thu, Dec 8, 2016 at 3:31 PM, Vinod Koul vinod.koul@intel.com wrote:
ret = regmap_write(max9867->regmap, MAX9867_IFC1A, iface1A);
ret = regmap_write(max9867->regmap, MAX9867_IFC1B, iface1B);
regmap_write(max9867->regmap, MAX9867_IFC1A, iface1A);
regmap_write(max9867->regmap, MAX9867_IFC1B, iface1B);
What about doing like this instead?
ret = regmap_write(max9867->regmap, MAX9867_IFC1A, iface1A); if (ret) return ret;
ret = regmap_write(max9867->regmap, MAX9867_IFC1B, iface1B); if (ret) return ret;
yeah we can, but I didn't want to add/remove anything from this code, so skipped the return which has same effect as previous code.
Btw should regmap_write() return be strictly checked or not?
Thanks
--
~Vinod