sfc: Only cancel the PPS workqueue if it exists
authorMartin Habets <mhabets@solarflare.com>
Thu, 21 Nov 2019 17:52:15 +0000 (17:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:07:35 +0000 (10:07 +0100)
commitcfaf81c239d38c4edfeddea3969b542c5cb59418
tree5fb006e45d2b524c5ceadc0e8f9a38a360a3b4d8
parent3ae06e9bd916dd1cf39f64cc153d3c369e01bac5
sfc: Only cancel the PPS workqueue if it exists

[ Upstream commit 723eb53690041740a13ac78efeaf6804f5d684c9 ]

The workqueue only exists for the primary PF. For other functions
we hit a WARN_ON in kernel/workqueue.c.

Fixes: 7c236c43b838 ("sfc: Add support for IEEE-1588 PTP")
Signed-off-by: Martin Habets <mhabets@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sfc/ptp.c