File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
drivers/net/ethernet/hisilicon/hns3/hns3pf Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -497,29 +497,32 @@ int hclge_ptp_init(struct hclge_dev *hdev)
497
497
if (ret ) {
498
498
dev_err (& hdev -> pdev -> dev ,
499
499
"failed to init freq, ret = %d\n" , ret );
500
- goto out ;
500
+ goto out_clear_int ;
501
501
}
502
502
503
503
ret = hclge_ptp_set_ts_mode (hdev , & hdev -> ptp -> ts_cfg );
504
504
if (ret ) {
505
505
dev_err (& hdev -> pdev -> dev ,
506
506
"failed to init ts mode, ret = %d\n" , ret );
507
- goto out ;
507
+ goto out_clear_int ;
508
508
}
509
509
510
510
ktime_get_real_ts64 (& ts );
511
511
ret = hclge_ptp_settime (& hdev -> ptp -> info , & ts );
512
512
if (ret ) {
513
513
dev_err (& hdev -> pdev -> dev ,
514
514
"failed to init ts time, ret = %d\n" , ret );
515
- goto out ;
515
+ goto out_clear_int ;
516
516
}
517
517
518
518
set_bit (HCLGE_STATE_PTP_EN , & hdev -> state );
519
519
dev_info (& hdev -> pdev -> dev , "phc initializes ok!\n" );
520
520
521
521
return 0 ;
522
522
523
+ out_clear_int :
524
+ clear_bit (HCLGE_PTP_FLAG_EN , & hdev -> ptp -> flags );
525
+ hclge_ptp_int_en (hdev , false);
523
526
out :
524
527
hclge_ptp_destroy_clock (hdev );
525
528
You can’t perform that action at this time.
0 commit comments