On 03/30/2018 08:27 PM, Herbert Xu wrote:
On Mon, Mar 26, 2018 at 02:59:06PM +0300, Tudor Ambarus wrote:
Remove useless assignment of ret to -ENOMEM in rsa_verify.
Remove useless initialization of ret to zero at declaration in
rsa_enc/dec/sign/verify.

Benefit of the power of undefined values and set ret in branches in
rsa_enc/dec/sign.

Reported-by: Benjamin Bales <techsupp...@mycode.ai>
Signed-off-by: Tudor Ambarus <tudor.amba...@microchip.com>

The existing code looks fine.  If anything we should move the
assignments out of the if clause.

I set the err inside the if branch so that the compiler will
warn me in case of undefined value for err. Like here:

https://rusty.ozlabs.org/?p=232

Best,
ta

Reply via email to