bnxt_en: Initiallize bp->ptp_lock first before using it
authorMichael Chan <michael.chan@broadcom.com>
Tue, 3 May 2022 01:13:11 +0000 (21:13 -0400)
committerJakub Kicinski <kuba@kernel.org>
Wed, 4 May 2022 00:41:32 +0000 (17:41 -0700)
commit2b156fb57d8f0d28f2207edc646751f4717cf20d
tree09dcdefbc52d4d480fa016def61f7ab21f241abf
parent13ba794397e45e52893cfc21d7a69cb5f341b407
bnxt_en: Initiallize bp->ptp_lock first before using it

bnxt_ptp_init() calls bnxt_ptp_init_rtc() which will acquire the ptp_lock
spinlock.  The spinlock is not initialized until later.  Move the
bnxt_ptp_init_rtc() call after the spinlock is initialized.

Fixes: 24ac1ecd5240 ("bnxt_en: Add driver support to use Real Time Counter for PTP")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c