diff mbox

[2/2] linux-generic: odp_crypto_operation merge 2 ifs

Message ID 1424102658-26557-2-git-send-email-maxim.uvarov@linaro.org
State Superseded
Headers show

Commit Message

Maxim Uvarov Feb. 16, 2015, 4:04 p.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 platform/linux-generic/odp_crypto.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index fb1e3fc..9bb887a 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -360,11 +360,10 @@  odp_crypto_operation(odp_crypto_op_params_t *params,
 	session = (odp_crypto_generic_session_t *)(intptr_t)params->session;
 
 	/* Resolve output buffer */
-	if (ODP_PACKET_INVALID == params->out_pkt)
-		if (ODP_POOL_INVALID != session->output_pool)
-			params->out_pkt =
-				odp_packet_alloc(session->output_pool,
-						 odp_packet_len(params->pkt));
+	if (ODP_PACKET_INVALID == params->out_pkt &&
+	    ODP_POOL_INVALID != session->output_pool)
+		params->out_pkt = odp_packet_alloc(session->output_pool,
+				odp_packet_len(params->pkt));
 	if (params->pkt != params->out_pkt) {
 		if (odp_unlikely(ODP_PACKET_INVALID == params->out_pkt))
 			ODP_ABORT();