Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bnxt_en: Drop redundant if block in bnxt_dl_flash_update()

The devlink stack has sanity checks and it invokes flash_update()
only if it is supported by the driver. The VF driver does not
advertise the support for flash_update in struct devlink_ops.
This makes if condition inside bnxt_dl_flash_update() redundant.

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250917040839.1924698-2-michael.chan@broadcom.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Kalesh AP and committed by
Paolo Abeni
3b46a9e4 64d26169

-6
-6
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
··· 40 40 struct bnxt *bp = bnxt_get_bp_from_dl(dl); 41 41 int rc; 42 42 43 - if (!BNXT_PF(bp)) { 44 - NL_SET_ERR_MSG_MOD(extack, 45 - "flash update not supported from a VF"); 46 - return -EPERM; 47 - } 48 - 49 43 devlink_flash_update_status_notify(dl, "Preparing to flash", NULL, 0, 0); 50 44 rc = bnxt_flash_package_from_fw_obj(bp->dev, params->fw, 0, extack); 51 45 if (!rc)