Re: [PATCH 13/20] serial: stm32: fix error handling in probe

2017-06-29 Thread Greg Kroah-Hartman
On Mon, Jun 26, 2017 at 12:49:14PM +, Bich HEMON wrote:
> From: Bich Hemon 
> 
> Signed-off-by: Fabrice Gasnier 

Again, no changelog == no patch applied.

Please fix this, and the signed-off-by issues for all of these patches
for your next revision of this patchset.

thanks,

greg k-h


Re: [PATCH 13/20] serial: stm32: fix error handling in probe

2017-06-29 Thread Greg Kroah-Hartman
On Mon, Jun 26, 2017 at 12:49:14PM +, Bich HEMON wrote:
> From: Bich Hemon 
> 
> Signed-off-by: Fabrice Gasnier 

Again, no changelog == no patch applied.

Please fix this, and the signed-off-by issues for all of these patches
for your next revision of this patchset.

thanks,

greg k-h


[PATCH 13/20] serial: stm32: fix error handling in probe

2017-06-26 Thread Bich HEMON
From: Bich Hemon 

Signed-off-by: Fabrice Gasnier 
---
 drivers/tty/serial/stm32-usart.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index c54b89d..a62fc95 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -779,8 +779,10 @@ static int stm32_init_port(struct stm32_port *stm32port,
return ret;
 
stm32port->port.uartclk = clk_get_rate(stm32port->clk);
-   if (!stm32port->port.uartclk)
+   if (!stm32port->port.uartclk) {
+   clk_disable_unprepare(stm32port->clk);
ret = -EINVAL;
+   }
 
return ret;
 }
@@ -964,7 +966,7 @@ static int stm32_serial_probe(struct platform_device *pdev)
 
ret = uart_add_one_port(_usart_driver, >port);
if (ret)
-   return ret;
+   goto err_uninit;
 
ret = stm32_of_dma_rx_probe(stm32port, pdev);
if (ret)
@@ -977,6 +979,11 @@ static int stm32_serial_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, >port);
 
return 0;
+
+err_uninit:
+   clk_disable_unprepare(stm32port->clk);
+
+   return ret;
 }
 
 static int stm32_serial_remove(struct platform_device *pdev)
-- 
1.9.1


[PATCH 13/20] serial: stm32: fix error handling in probe

2017-06-26 Thread Bich HEMON
From: Bich Hemon 

Signed-off-by: Fabrice Gasnier 
---
 drivers/tty/serial/stm32-usart.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index c54b89d..a62fc95 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -779,8 +779,10 @@ static int stm32_init_port(struct stm32_port *stm32port,
return ret;
 
stm32port->port.uartclk = clk_get_rate(stm32port->clk);
-   if (!stm32port->port.uartclk)
+   if (!stm32port->port.uartclk) {
+   clk_disable_unprepare(stm32port->clk);
ret = -EINVAL;
+   }
 
return ret;
 }
@@ -964,7 +966,7 @@ static int stm32_serial_probe(struct platform_device *pdev)
 
ret = uart_add_one_port(_usart_driver, >port);
if (ret)
-   return ret;
+   goto err_uninit;
 
ret = stm32_of_dma_rx_probe(stm32port, pdev);
if (ret)
@@ -977,6 +979,11 @@ static int stm32_serial_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, >port);
 
return 0;
+
+err_uninit:
+   clk_disable_unprepare(stm32port->clk);
+
+   return ret;
 }
 
 static int stm32_serial_remove(struct platform_device *pdev)
-- 
1.9.1