Thread (2 messages) 2 messages, 2 authors, 2021-04-26
STALE1884d

[PATCH v2] tty: serial: samsung_tty: remove set but not used variables

From: Tian Tao <tiantao6@hisilicon.com>
Date: 2021-04-26 13:20:53
Also in: linux-samsung-soc, linux-serial
Subsystem: arm/samsung s3c, s5p and exynos arm architectures, the rest, tty layer and serial drivers · Maintainers: Krzysztof Kozlowski, Peter Griffin, Linus Torvalds, Greg Kroah-Hartman, Jiri Slaby

The value of 'ret' is not used which reported by svace, so jutst return
instead of break.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
v2: s3c24xx_serial_probe function exit than convert ret to some default
value when the attribute "reg-io-width" is not 1 or 4.
---
 drivers/tty/serial/samsung_tty.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index d9e4b67..9fbc611 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -2220,8 +2220,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
 			default:
 				dev_warn(&pdev->dev, "unsupported reg-io-width (%d)\n",
 						prop);
-				ret = -EINVAL;
-				break;
+				return -EINVAL;
 			}
 		}
 	}
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help