ACPI: processor: driver doesn't need to evaluate _PDC
[firefly-linux-kernel-4.4.55.git] / drivers / serial / imx.c
index 60d665a17a885b280cd98b289dd783a58d9d4ac7..e579d7a1807ab4728bed3d94520f5c8e1e499ae4 100644 (file)
@@ -440,7 +440,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
 
                temp = readl(sport->port.membase + USR2);
                if (temp & USR2_BRCD) {
-                       writel(temp | USR2_BRCD, sport->port.membase + USR2);
+                       writel(USR2_BRCD, sport->port.membase + USR2);
                        if (uart_handle_break(&sport->port))
                                continue;
                }
@@ -1279,7 +1279,7 @@ static int serial_imx_probe(struct platform_device *pdev)
                sport->use_irda = 1;
 #endif
 
-       if (pdata->init) {
+       if (pdata && pdata->init) {
                ret = pdata->init(pdev);
                if (ret)
                        goto clkput;
@@ -1292,7 +1292,7 @@ static int serial_imx_probe(struct platform_device *pdev)
 
        return 0;
 deinit:
-       if (pdata->exit)
+       if (pdata && pdata->exit)
                pdata->exit(pdev);
 clkput:
        clk_put(sport->clk);
@@ -1321,7 +1321,7 @@ static int serial_imx_remove(struct platform_device *pdev)
 
        clk_disable(sport->clk);
 
-       if (pdata->exit)
+       if (pdata && pdata->exit)
                pdata->exit(pdev);
 
        iounmap(sport->port.membase);