mbox series

[SRU,J:linux-bluefield,v1,0/1] net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe

Message ID cover.1664551249.git.davthompson@nvidia.com
Headers show
Series net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe | expand

Message

David Thompson Sept. 30, 2022, 3:24 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1991403

SRU Justification:

[Impact]

The following upstream commit was recently added to Jammy:
  3a1a274e933f mlxbf_gige: compute MDIO period based on i1clk

This patch added driver logic that includes a "devm_ioremap"
call, but the error handling logic pertaining to this call
is incorrect.

[Fix]

The "devm_ioremap" function returns NULL on error, it doesn't
return error pointers. The error handling logic has been
fixed accordingly.

[Test Case]

Boot platform and bring up "oob_net0" interface properly
Test that network traffic works properly

[Regression Potential]

Low, as the patch was reviewed upstream

[Other]

None

Peng Wu (1):
  net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe

 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tim Gardner Sept. 30, 2022, 4:41 p.m. UTC | #1
On 9/30/22 09:24, David Thompson wrote:
> BugLink: https://bugs.launchpad.net/bugs/1991403
> 
> SRU Justification:
> 
> [Impact]
> 
> The following upstream commit was recently added to Jammy:
>    3a1a274e933f mlxbf_gige: compute MDIO period based on i1clk
> 
> This patch added driver logic that includes a "devm_ioremap"
> call, but the error handling logic pertaining to this call
> is incorrect.
> 
> [Fix]
> 
> The "devm_ioremap" function returns NULL on error, it doesn't
> return error pointers. The error handling logic has been
> fixed accordingly.
> 
> [Test Case]
> 
> Boot platform and bring up "oob_net0" interface properly
> Test that network traffic works properly
> 
> [Regression Potential]
> 
> Low, as the patch was reviewed upstream
> 
> [Other]
> 
> None
> 
> Peng Wu (1):
>    net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe
> 
>   drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Kleber Souza Oct. 10, 2022, 10:31 a.m. UTC | #2
On 30.09.22 17:24, David Thompson wrote:
> BugLink: https://bugs.launchpad.net/bugs/1991403
> 
> SRU Justification:
> 
> [Impact]
> 
> The following upstream commit was recently added to Jammy:
>    3a1a274e933f mlxbf_gige: compute MDIO period based on i1clk
> 
> This patch added driver logic that includes a "devm_ioremap"
> call, but the error handling logic pertaining to this call
> is incorrect.
> 
> [Fix]
> 
> The "devm_ioremap" function returns NULL on error, it doesn't
> return error pointers. The error handling logic has been
> fixed accordingly.
> 
> [Test Case]
> 
> Boot platform and bring up "oob_net0" interface properly
> Test that network traffic works properly
> 
> [Regression Potential]
> 
> Low, as the patch was reviewed upstream
> 
> [Other]
> 
> None
> 
> Peng Wu (1):
>    net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe
> 
>   drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 


Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

Thanks
Bartlomiej Zolnierkiewicz Oct. 18, 2022, 10:26 a.m. UTC | #3
Applied to jammy:linux-bluefield. Thanks.

--
Best regards,
Bartlomiej

On Fri, Sep 30, 2022 at 5:25 PM David Thompson <davthompson@nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/1991403
>
> SRU Justification:
>
> [Impact]
>
> The following upstream commit was recently added to Jammy:
>   3a1a274e933f mlxbf_gige: compute MDIO period based on i1clk
>
> This patch added driver logic that includes a "devm_ioremap"
> call, but the error handling logic pertaining to this call
> is incorrect.
>
> [Fix]
>
> The "devm_ioremap" function returns NULL on error, it doesn't
> return error pointers. The error handling logic has been
> fixed accordingly.
>
> [Test Case]
>
> Boot platform and bring up "oob_net0" interface properly
> Test that network traffic works properly
>
> [Regression Potential]
>
> Low, as the patch was reviewed upstream
>
> [Other]
>
> None
>
> Peng Wu (1):
>   net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe
>
>  drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.30.1