@@ -2664,6 +2664,7 @@ static int lpuart_probe(struct platform_device *pdev)
2664
2664
struct device_node * np = pdev -> dev .of_node ;
2665
2665
struct lpuart_port * sport ;
2666
2666
struct resource * res ;
2667
+ irq_handler_t handler ;
2667
2668
int ret ;
2668
2669
2669
2670
sport = devm_kzalloc (& pdev -> dev , sizeof (* sport ), GFP_KERNEL );
@@ -2741,17 +2742,11 @@ static int lpuart_probe(struct platform_device *pdev)
2741
2742
2742
2743
if (lpuart_is_32 (sport )) {
2743
2744
lpuart_reg .cons = LPUART32_CONSOLE ;
2744
- ret = devm_request_irq (& pdev -> dev , sport -> port .irq , lpuart32_int , 0 ,
2745
- DRIVER_NAME , sport );
2745
+ handler = lpuart32_int ;
2746
2746
} else {
2747
2747
lpuart_reg .cons = LPUART_CONSOLE ;
2748
- ret = devm_request_irq (& pdev -> dev , sport -> port .irq , lpuart_int , 0 ,
2749
- DRIVER_NAME , sport );
2748
+ handler = lpuart_int ;
2750
2749
}
2751
-
2752
- if (ret )
2753
- goto failed_irq_request ;
2754
-
2755
2750
ret = uart_add_one_port (& lpuart_reg , & sport -> port );
2756
2751
if (ret )
2757
2752
goto failed_attach_port ;
@@ -2773,13 +2768,18 @@ static int lpuart_probe(struct platform_device *pdev)
2773
2768
2774
2769
sport -> port .rs485_config (& sport -> port , & sport -> port .rs485 );
2775
2770
2771
+ ret = devm_request_irq (& pdev -> dev , sport -> port .irq , handler , 0 ,
2772
+ DRIVER_NAME , sport );
2773
+ if (ret )
2774
+ goto failed_irq_request ;
2775
+
2776
2776
return 0 ;
2777
2777
2778
+ failed_irq_request :
2778
2779
failed_get_rs485 :
2779
2780
failed_reset :
2780
2781
uart_remove_one_port (& lpuart_reg , & sport -> port );
2781
2782
failed_attach_port :
2782
- failed_irq_request :
2783
2783
lpuart_disable_clks (sport );
2784
2784
failed_clock_enable :
2785
2785
failed_out_of_range :
0 commit comments