net/sfc/base: fix check in NVRAM validate
authorAndy Moreton <amoreton@solarflare.com>
Thu, 16 Nov 2017 08:03:59 +0000 (08:03 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
Cc: stable@dpdk.org
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/efx_nvram.c

index a2b0e05..bdad5d5 100644 (file)
@@ -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);