Re: [PATCH] bnxt_en: Fix call to hardware monitoring event handler

Vadim Fedorenko <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 21/08/2026 05:45, Guenter Roeck wrote:
> The first parameter of hwmon_notify_event() is supposed to be the hardware
> monitoring device. The bnxt driver calls it with the platform device as
> first parameter instead. This API break results in undefined behavior and
> may result in a crash.
> 
> Pass the hardware monitoring device as parameter instead to fix the
> problem.
> 
> Fixes: a19b4801457b0 ("bnxt_en: Event handler for Thermal event")
> Cc: Kalesh AP <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
>   drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c
> index de3427c6c6aa..faed0cf726e1 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c
> @@ -40,7 +40,7 @@ void bnxt_hwmon_notify_event(struct bnxt *bp)
>   		return;
>   	}
>   
> -	hwmon_notify_event(&bp->pdev->dev, hwmon_temp, attr, 0);
> +	hwmon_notify_event(bp->hwmon_dev, hwmon_temp, attr, 0);
>   }
>   
>   static int bnxt_hwrm_temp_query(struct bnxt *bp, u8 *temp)

Reviewed-by: Vadim Fedorenko <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.