mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][UPDATE] rtc: Added support for ds1672 control
Date: Tue, 28 Mar 2006 17:52:00 -0600	[thread overview]
Message-ID: <E135E70C-2F39-4007-B4CC-4D1AEBE2EE74@kernel.crashing.org> (raw)
In-Reply-To: <20060329014851.0f54da89@inspiron>


On Mar 28, 2006, at 5:48 PM, Alessandro Zummo wrote:

> 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;

It could be, but doesn't need to.  ds1672_get_control either returns  
0 (success) or non-zero (-EIO) for failure.

>> +	/* read control register */
>> +	err = ds1672_get_control(client, &control);
>> +	if (err) {
>> +		dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
>> +		goto exit_detach;
>> +	}
>
>  ditto.

ditto.

- kumar


  reply	other threads:[~2006-03-28 23:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 21:07 [PATCH] " Kumar Gala
2006-03-28 21:40 ` Alessandro Zummo
2006-03-28 22:04   ` Kumar Gala
2006-03-28 22:41     ` Alessandro Zummo
2006-03-28 22:55       ` [PATCH][UPDATE] " Kumar Gala
2006-03-28 23:48         ` Alessandro Zummo
2006-03-28 23:52           ` Kumar Gala [this message]
2006-03-28 23:57             ` Alessandro Zummo
2006-03-30 20:06               ` Kumar Gala
2006-03-30 20:26                 ` Alessandro Zummo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E135E70C-2F39-4007-B4CC-4D1AEBE2EE74@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=alessandro.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®