[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170906192821.4ytcxj436uyug6pr@mwanda>
Date: Wed, 6 Sep 2017 22:28:21 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Gilad Ben-Yossef <gilad@...yossef.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-crypto@...r.kernel.org,
driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Ofir Drang <ofir.drang@....com>
Subject: Re: [PATCH 8/8] staging: ccree: remove BUG macro usage
On Sun, Sep 03, 2017 at 11:56:50AM +0300, Gilad Ben-Yossef wrote:
> @@ -1154,7 +1150,8 @@ static inline int ssi_buffer_mgr_aead_chain_data(
> //if have reached the end of the sgl, then this is unexpected
> if (!areq_ctx->src_sgl) {
> SSI_LOG_ERR("reached end of sg list. unexpected\n");
> - BUG();
> + return -EINVAL;
> + goto chain_data_exit;
You've got a direct return followed by a goto.
It's a do-nothing goto that just returns rc. I hate those. I've tried
to review locking bugs to see if single returns prevent future
programmers from introducing new error paths which don't unlock. They
don't really help...
regards,
dan carpenter
Powered by blists - more mailing lists