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: <560ECA45.30700@osg.samsung.com>
Date:	Fri, 2 Oct 2015 20:17:41 +0200
From:	Javier Martinez Canillas <javier@....samsung.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	linux-kernel@...r.kernel.org, Axel Lin <axel.lin@...ics.com>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Daniel Mack <linux@...que.org>, linux-input@...r.kernel.org,
	Matt Ranostay <mranostay@...il.com>
Subject: Re: [PATCH 07/18] Input: cap11xx - simplify function return logic

Hello Dmitry,

On 10/02/2015 08:09 PM, Dmitry Torokhov wrote:

[snip]

>>  
>> -	error = devm_request_threaded_irq(dev, irq, NULL, cap11xx_thread_func,
>> -					  IRQF_ONESHOT, dev_name(dev), priv);
>> -	if (error)
>> -		return error;
>> -
>> -	return 0;
>> +	return devm_request_threaded_irq(dev, irq, NULL, cap11xx_thread_func,
>> +					 IRQF_ONESHOT, dev_name(dev), priv);
>>  }
> 
> For cases where we have multiple of potentially failing actions:
> 
> 	error = action1();
> 	if (error)
> 		return error;
> 
> 	error = action2();
> 	if (error)
> 		return error;
> 
> 	error = action3();
> 	if (error)
> 		return error;
> 
> 	return 0;
> 
> I prefer not to compress the last action check to "return action3()".
> 

Fair enough, I don't mind if you drop those patches then.
Thanks a lot for your feedback.

> Thanks.
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
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