Re: [PATCH v2 3/3] serial: mxs-auart: Remove unneeded zeroing of 'ret'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




W dniu 2015-01-14 o 17:39, Fabio Estevam pisze:
From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

There is no need to explicitly zero the 'ret' variable as it is properly
initialized in a few lines below as:

ret = serial_mxs_probe_dt(s, pdev);

Remove the unneeded zeroing of 'ret'.

Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
---
Changes since v1:
- Improve commit log as suggested by Janusz

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

diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index b54b6a2..d1298b6 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1226,7 +1226,7 @@ static int mxs_auart_probe(struct platform_device *pdev)
  			of_match_device(mxs_auart_dt_ids, &pdev->dev);
  	struct mxs_auart_port *s;
  	u32 version;
-	int ret = 0, irq;
+	int ret, irq;
  	struct resource *r;
s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);
I looked at the probe function and I guess you can get uninitialized variable warning
as there is
    ret = -ENOMEM;
    goto out;
error path before the
    ret = serial_mxs_probe_dt(s, pdev);

best regards
Janusz

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux