From 2620f47aa7a54ed21844355ef026b49b6f1e4255 Mon Sep 17 00:00:00 2001 From: Andy Moreton Date: Thu, 16 Nov 2017 08:03:59 +0000 Subject: [PATCH] net/sfc/base: fix check in NVRAM validate Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support") Cc: stable@dpdk.org Signed-off-by: Andy Moreton Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_nvram.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/sfc/base/efx_nvram.c b/drivers/net/sfc/base/efx_nvram.c index a2b0e053f4..bdad5d509a 100644 --- a/drivers/net/sfc/base/efx_nvram.c +++ b/drivers/net/sfc/base/efx_nvram.c @@ -468,10 +468,11 @@ efx_nvram_validate( if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0) goto fail1; - if (envop->envo_type_to_partn != NULL && - ((rc = envop->envo_buffer_validate(enp, partn, - partn_data, partn_size)) != 0)) - goto fail2; + if (envop->envo_buffer_validate != NULL) { + if ((rc = envop->envo_buffer_validate(enp, partn, + partn_data, partn_size)) != 0) + goto fail2; + } return (0); -- 2.20.1