diff options
| author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2019-12-10 02:49:10 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-04 19:18:53 +0100 |
| commit | 3f750698a0a8e3b559a4519edf7ec9e1ac2205aa (patch) | |
| tree | e9de29f9f86dc9d8d4f29304ff9fcc221cc8b64d /include/linux/string_helpers.h | |
| parent | a76837dd731b68cc3b5690470bc9efa2a8e3801a (diff) | |
bnxt_en: Fix bp->fw_health allocation and free logic.
[ Upstream commit 8280b38e01f71e0f89389ccad3fa43b79e57c604 ]
bp->fw_health needs to be allocated for either the firmware initiated
reset feature or the driver initiated error recovery feature. The
current code is not allocating bp->fw_health for all the necessary cases.
This patch corrects the logic to allocate bp->fw_health correctly when
needed. If allocation fails, we clear the feature flags.
We also add the the missing kfree(bp->fw_health) when the driver is
unloaded. If we get an async reset message from the firmware, we also
need to make sure that we have a valid bp->fw_health before proceeding.
Fixes: 07f83d72d238 ("bnxt_en: Discover firmware error recovery capabilities.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/string_helpers.h')
0 files changed, 0 insertions, 0 deletions
