lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C5819F0.3040104@gmail.com>
Date:	Tue, 03 Aug 2010 06:30:24 -0700
From:	"Justin P. Mattock" <justinmattock@...il.com>
To:	Valdis.Kletnieks@...edu
CC:	linux-usb@...r.kernel.org, dbrownell@...rs.sourceforge.net,
	gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2]drivers/usb/core/sysfs.c Fix variable 'retval' set
 but not used

On 08/03/2010 04:28 AM, Valdis.Kletnieks@...edu wrote:
> On Mon, 02 Aug 2010 21:26:28 PDT, "Justin P. Mattock" said:
>> diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
>
>>   	if (alt->string)
>> -		retval = device_create_file(&intf->dev,&dev_attr_interface);
>> +		device_create_file(&intf->dev,&dev_attr_interface);
>>   	intf->sysfs_files_created = 1;
>>   	return 0;
>
> What should the code do if device_create_file() manages to fail? Yes, ignoring
> the return value is one option, but is it the best one?  'return ret;' might be
> another one. Somebody who understands this code and has more caffeine than me
> should look this over.
>
ignoring the return value is one option, but is it the best one? 
probably not. As for return ret; the option did cross my mind, but 
figured to do what I had done by removing the retval

> (Nothing personal Justin - it's just my opinion that *anytime* we have a patch
> that remove a check for a return code, it needs to justify that ignoring the
> return code is appropriate).
>

nothing personal taken.. in fact I agree with that whole paragraph. 
looking back I should of really explained why I was removing this code 
besides a warning message.

Thanks for the response and info on this..

Justin P. Mattock

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ