[Power-supply]: Error handling in max17042_battery.c

From: Pallala, Ramakrishna
Date: Fri Aug 26 2011 - 01:48:26 EST


Hi All,

I am working on the I2C based max17042 fuel gauge driver
Which is drivers/power/max17042_battery.c

In max17042_get_property(...), the values returned by
Max17042_read_reg are directly assigned to the variables,
even if the read results in an error. Shouldn't we check
for the 'correctness' of the returned values and then
assign them ? Can I submit a patch to change this ?

Or Is this done intentionally ?

Thanks,
Ram



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