Skip to contentSkip to conversation

soc: qcom-geni-se: remove redundant initialization to variable line

PATCH In review Colin King 3 participants 3 messages Apr 22, 2021 – Apr 23, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 soc: qcom-geni-se: remove redundant initialization to variable line

From: Colin Ian King <[email protected]>

The variable line being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/tty/serial/qcom_geni_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/qcom_geni_serial.c +1 -1
index 99375d99f6fa..c5f2a4fa2bb1 100644
@@ -1338,7 +1338,7 @@ static const struct uart_ops qcom_geni_uart_pops = {
 static int qcom_geni_serial_probe(struct platform_device *pdev)
 {
 	int ret = 0;
-	int line = -1;
+	int line;
 	struct qcom_geni_serial_port *port;
 	struct uart_port *uport;
 	struct resource *res;
Signature · 1 line
2.30.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Colin King

From: Colin Ian King <[email protected]>

The variable line being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Quoted 18 lines
---
  drivers/tty/serial/qcom_geni_serial.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/qcom_geni_serial.c +1 -1
index 99375d99f6fa..c5f2a4fa2bb1 100644
@@ -1338,7 +1338,7 @@ static const struct uart_ops qcom_geni_uart_pops = {
  static int qcom_geni_serial_probe(struct platform_device *pdev)
  {
  	int ret = 0;
-	int line = -1;
+	int line;
  	struct qcom_geni_serial_port *port;
  	struct uart_port *uport;
  	struct resource *res;
Signature · 2 lines
js
suse labs
#2 lore raw
In reply to Colin King
Quoted 11 lines · Colin King

From: Colin Ian King <[email protected]>

The variable line being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/tty/serial/qcom_geni_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Your subject line is odd, this is not a "SOC" driver :(