mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-13 12:02:27 -04:00
pds_core: check for work queue before use
Add a check that the wq exists before queuing up work for a
failed devcmd, as the PF is responsible for health and the VF
doesn't have a wq.
Fixes: c2dbb09043 ("pds_core: health timer and workqueue")
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230824161754.34264-5-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
95e383226d
commit
969cfd4c8c
@@ -183,7 +183,7 @@ int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
||||
err = pdsc_devcmd_wait(pdsc, max_seconds);
|
||||
memcpy_fromio(comp, &pdsc->cmd_regs->comp, sizeof(*comp));
|
||||
|
||||
if (err == -ENXIO || err == -ETIMEDOUT)
|
||||
if ((err == -ENXIO || err == -ETIMEDOUT) && pdsc->wq)
|
||||
queue_work(pdsc->wq, &pdsc->health_work);
|
||||
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user