lkml.org 
[lkml]   [2006]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][UPDATE] rtc: Added support for ds1672 control
On Tue, 28 Mar 2006 16:55:01 -0600 (CST)
Kumar Gala <galak@kernel.crashing.org> 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.

--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

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

\
 
 \ /
  Last update: 2006-03-29 01:52    [W:0.052 / U:3.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site