lkml.org 
[lkml]   [2006]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/11] RTC subsystem, sysfs interface
On Mon, 13 Feb 2006 22:47:17 -0500
Dmitry Torokhov <dtor_core@ameritech.net> wrote:

> > + struct rtc_time tm;
> > +
> > + if ((retval = rtc_read_time(dev, &tm)) == 0) {
>
> Retval is set unconditionally here so there is no point in initializing
> it to -ENODEV above.

> > +static int __devinit rtc_sysfs_add_device(struct class_device *class_dev,
> > + struct class_interface *class_intf)
> > +{
> > + class_device_create_file(class_dev, &class_device_attr_name);
> > + class_device_create_file(class_dev, &class_device_attr_date);
> > + class_device_create_file(class_dev, &class_device_attr_time);
> > + class_device_create_file(class_dev, &class_device_attr_since_epoch);
>
> Maybe using attribute group here will help and also allow easier error
> hanling?

done, thanks.

--

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-02-19 23:29    [W:0.051 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site