mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
bnxt_en: Fix call to hardware monitoring event handler
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: a19b480145 ("bnxt_en: Event handler for Thermal event")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20260821044512.663941-1-linux@roeck-us.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
4e15e89faa
commit
622d698df4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user