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]
Date:	Sat, 28 Jan 2012 09:51:46 +0100 (CET)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Wolfram Sang <w.sang@...gutronix.de>
cc:	Julia Lawall <julia.lawall@...6.fr>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	Takashi Iwai <tiwai@...e.de>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Dong Aisheng-B29396 <B29396@...escale.com>,
	Liam Girdwood <lrg@...com>
Subject: Re: [alsa-devel] [PATCH 1/15] sound/soc/mxs/mxs-saif.c: add missing
 iounmap

On Sat, 28 Jan 2012, Wolfram Sang wrote:

>>> You can skip checking 'iores', too. I also did that in the example, but
>>> a lot of people seem to miss it.
>>
>> I can try to do that, but it seems a little bit unintuitive.
>> Perhaps it would be easier for people to remember to put in error
>> handling code when they need it if they always have to do it?  If I
>> remove it, there will be one call that has no test and then another
>> call a few lines later that does.
>
> I see your point. I would still like to get rid of the duplicated code
> (then it can't be forgotten as well). Maybe I should have named the
> function something alike devm_check_and_request_and_ioremap()? Then I
> could have also introduced a similar function for requesting irq. Will
> think about this a bit more. Thanks for updating your patch!

Despite believing in my point, error handling code is where people make a 
lot of mistakes.  Getting rid of it seems always to be a good idea.  Maybe 
such checks could be moved into more uses of the result of 
platform_get_resource.

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