[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100803154615.GA32034@suse.de>
Date: Tue, 3 Aug 2010 08:46:15 -0700
From: Greg KH <gregkh@...e.de>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Valdis.Kletnieks@...edu,
"Justin P. Mattock" <justinmattock@...il.com>,
linux-usb@...r.kernel.org, dbrownell@...rs.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2]drivers/usb/core/sysfs.c Fix variable 'retval' set
but not used
On Tue, Aug 03, 2010 at 11:34:26AM -0400, Alan Stern wrote:
> On Tue, 3 Aug 2010 Valdis.Kletnieks@...edu wrote:
>
> > > Failure to create a file in sysfs is almost never fatal and usually not
> > > even dangerous. Ignoring the error is generally better than failing
> > > the entire operation.
> >
> > Then why the __must_check attribute if it's usually ignorable? I thought
> > that was reserved for functions that you damned sight better well check
> > for errors because bad things are afoot otherwise?
>
> That's a good question. Perhaps Greg KH knows the answer.
You should check the return value for that function. To not do that is
a bug. This one looks like it snuck through. Fixing it properly is the
correct thing to do.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists