On Tue, 28 Mar 2006 16:55:01 -0600 (CST)
Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx> wrote:
+/* following are the sysfs callback functions */
+static ssize_t show_control(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ char *state = "enabled";
+ u8 control;
+ int err;
+
+ err = ds1672_get_control(client, &control);
+ if (err)
+ return err;
shouldn't this be
if (err < 0)
return err;
+ /* read control register */
+ err = ds1672_get_control(client, &control);
+ if (err) {
+ dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+ goto exit_detach;
+ }
ditto.