rxrpc: key: use BUG_ON instead of if condition followed by BUG
Subsystems (3)
PATCH 1/1 rxrpc: key: use BUG_ON instead of if condition followed by BUG
Use BUG_ON instead of if condition followed by BUG.
This issue was detected with the help of Coccinelle.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- net/rxrpc/key.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/rxrpc/key.c +1 -2
@@ -851,8 +851,7 @@ static int rxrpc_preparse_s(struct key_preparsed_payload *prep)return PTR_ERR (ci); } -if (crypto_skcipher_setkey (ci, prep->data,8 ) <0 ) -BUG (); +BUG_ON (crypto_skcipher_setkey (ci, prep->data,8 ) <0 ); prep->payload.data[0 ] = ci;_leave (" = 0" );
Signature · 1 line
2.7.4