ice: simplify the return expression of ice_finalize_update()
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:10:34 +0000 (21:10 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Sep 2020 20:47:07 +0000 (13:47 -0700)
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ice/ice_fw_update.c

index deaefe0..292d87b 100644 (file)
@@ -608,14 +608,9 @@ static int ice_finalize_update(struct pldmfw *context)
        struct ice_fwu_priv *priv = container_of(context, struct ice_fwu_priv, context);
        struct netlink_ext_ack *extack = priv->extack;
        struct ice_pf *pf = priv->pf;
-       int err;
 
        /* Finally, notify firmware to activate the written NVM banks */
-       err = ice_switch_flash_banks(pf, priv->activate_flags, extack);
-       if (err)
-               return err;
-
-       return 0;
+       return ice_switch_flash_banks(pf, priv->activate_flags, extack);
 }
 
 static const struct pldmfw_ops ice_fwu_ops = {