From: Andy Moreton Date: Thu, 16 Nov 2017 08:03:59 +0000 (+0000) Subject: net/sfc/base: fix check in NVRAM validate X-Git-Tag: spdx-start~674 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2620f47aa7a54ed21844355ef026b49b6f1e4255;p=dpdk.git 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 --- 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);