OSDN Git Service

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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Nov 2019 20:06:06 +0000 (12:06 -0800)
commit723eb53690041740a13ac78efeaf6804f5d684c9
treee5ee57143dccb75b9a518101f2688a13f974e6e0
parent5f9f0b11f0816b35867f2cf71e54d95f53f03902
sfc: Only cancel the PPS workqueue if it exists

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>
drivers/net/ethernet/sfc/ptp.c