Re: [PATCH 07/18] Input: cap11xx - simplify function return logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux