From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon/lm70: Add a name attribute
Date: Sat, 18 Aug 2007 14:07:18 +0000 [thread overview]
Message-ID: <20070818160718.1607f7ca@hyperion.delvare> (raw)
In-Reply-To: <20070817173135.5eaffc0e@hyperion.delvare>
Hi Kaiwan,
On Sat, 18 Aug 2007 11:44:22 +0530, Kaiwan N Billimoria wrote:
> > @@ -115,7 +123,8 @@ static int __devinit lm70_probe(struct s
> > }
> > dev_set_drvdata(&spi->dev, p_lm70);
> >
> > - if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input))) {
> > + if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input))
> > + || (status = device_create_file(&spi->dev, &dev_attr_name))) {
> > dev_dbg(&spi->dev, "device_create_file failure.\n");
> > goto out_dev_create_file_failed;
> > }
> > @@ -123,6 +132,7 @@ static int __devinit lm70_probe(struct s
> > return 0;
> >
> > out_dev_create_file_failed:
> > + device_remove_file(&spi->dev, &dev_attr_temp1_input);
>
> Ah. Thanks!
>
> > hwmon_device_unregister(p_lm70->cdev);
> > out_dev_reg_failed:
> > dev_set_drvdata(&spi->dev, NULL);
Just to make it clear: there was no bug there. This call to
device_remove_file() is now needed in the case where the temp1_input
file would be successfully created but the name file creation would
fail.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2007-08-18 14:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 15:31 [lm-sensors] [PATCH] hwmon/lm70: Add a name attribute Jean Delvare
2007-08-17 16:17 ` Hans de Goede
2007-08-18 6:26 ` Kaiwan N Billimoria
2007-08-18 14:07 ` Jean Delvare [this message]
2007-08-26 18:50 ` Mark M. Hoffman
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=20070818160718.1607f7ca@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.