[PATCH 12/14] drivers/spi/spi-coldfire-qspi.c: fix error return code

2012-08-19 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

Initialize return variable before exiting on an error path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// smpl
(
if@p1 (\(ret  0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != ret
*if(...)
{
  ... when != ret = e2
  when forall
 return ret;
}

// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
 drivers/spi/spi-coldfire-qspi.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index b2d4b9e..7889796 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -462,6 +462,7 @@ static int __devinit mcfqspi_probe(struct platform_device 
*pdev)
pdata = pdev-dev.platform_data;
if (!pdata) {
dev_dbg(pdev-dev, platform data is missing\n);
+   status = -EINVAL;
goto fail4;
}
master-bus_num = pdata-bus_num;


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 10/14] drivers/spi/spi-ep93xx.c: fix error return code

2012-08-19 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

Initialize return variable before exiting on an error path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// smpl
(
if@p1 (\(ret  0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != ret
*if(...)
{
  ... when != ret = e2
  when forall
 return ret;
}

// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
 drivers/spi/spi-ep93xx.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index f97f1d2..9e7fdfd 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -1105,6 +1105,7 @@ static int __devinit ep93xx_spi_probe(struct 
platform_device *pdev)
espi-wq = create_singlethread_workqueue(ep93xx_spid);
if (!espi-wq) {
dev_err(pdev-dev, unable to create workqueue\n);
+   error = -ENOMEM;
goto fail_free_dma;
}
INIT_WORK(espi-msg_work, ep93xx_spi_work);


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 11/14] drivers/spi/spi-orion.c: fix error return code

2012-08-19 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

Initialize return variable before exiting on an error path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// smpl
(
if@p1 (\(ret  0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != ret
*if(...)
{
  ... when != ret = e2
  when forall
 return ret;
}

// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
Actually, orion_spi_reset currently always returns 0, so the test is
never true.  Perhaps this should be taken into account in some other way.

 drivers/spi/spi-orion.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index b17c09c..cc12803 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -435,7 +435,8 @@ static int __init orion_spi_probe(struct platform_device 
*pdev)
}
spi-base = ioremap(r-start, SZ_1K);
 
-   if (orion_spi_reset(spi)  0)
+   status = orion_spi_reset(spi);
+   if (status  0)
goto out_rel_mem;
 
master-dev.of_node = pdev-dev.of_node;


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 9/14] drivers/spi/spi-omap-100k.c: fix error return code

2012-08-19 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

Initialize return variable before exiting on an error path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// smpl
(
if@p1 (\(ret  0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != ret
*if(...)
{
  ... when != ret = e2
  when forall
 return ret;
}

// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
Actually, omap1_spi100k_reset currently always returns 0, so the test is
never true.  Perhaps this should be taken into account in some other way.

 drivers/spi/spi-omap-100k.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index 9bd1c92..b581107 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -542,7 +542,8 @@ static int __devinit omap1_spi100k_probe(struct 
platform_device *pdev)
goto err2;
}
 
-   if (omap1_spi100k_reset(spi100k)  0)
+   status = omap1_spi100k_reset(spi100k);
+   if (status  0)
goto err3;
 
status = spi_register_master(master);


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 14/14] drivers/spi/spi-s3c24xx.c: fix error return code

2012-08-19 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr

Initialize return variable before exiting on an error path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// smpl
(
if@p1 (\(ret  0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != ret
*if(...)
{
  ... when != ret = e2
  when forall
 return ret;
}

// /smpl

Signed-off-by: Julia Lawall julia.law...@lip6.fr

---
Perhaps -EINVAL is not the right value in this case.

 drivers/spi/spi-s3c24xx.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 8ee7d79..a2a080b 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -611,6 +611,7 @@ static int __devinit s3c24xx_spi_probe(struct 
platform_device *pdev)
if (!pdata-set_cs) {
if (pdata-pin_cs  0) {
dev_err(pdev-dev, No chipselect pin\n);
+   err = -EINVAL;
goto err_register;
}
 


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[SPAM] Os 5 segredos da comunicação

2012-08-19 Thread Siamar
Seu cliente de e-mail não pode ler este e-mail.
Para visualizá-lo on-line, por favor, clique aqui:
http://vixdroid.com/display.php?M=3705336C=0c825fa573c599c48e0ef209c58e96dcS=271L=79N=45


Para parar de receber nossos
Emails:http://vixdroid.com/unsubscribe.php?M=3705336C=0c825fa573c599c48e0ef209c58e96dcL=79N=271
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi/pl022: Fix device remove function

2012-08-19 Thread Guenter Roeck
The call sequence spi_alloc_master/spi_register_master/spi_unregister_master
is complete; it reduces the device reference count to zero, which results in
device memory being freed. An extra call to spi_master_put is unnecessary
and results in an access to free memory. Drop it.

Signed-off-by: Guenter Roeck li...@roeck-us.net
---
 drivers/spi/spi-pl022.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index aab518e..47c6753 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2171,7 +2171,6 @@ pl022_remove(struct amba_device *adev)
amba_release_regions(adev);
tasklet_disable(pl022-pump_transfers);
spi_unregister_master(pl022-master);
-   spi_master_put(pl022-master);
amba_set_drvdata(adev, NULL);
return 0;
 }
-- 
1.7.9.7


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[SPAM] Especial de Telefonia - Galaxy SII por 999

2012-08-19 Thread Carrefour
Your email client cannot read this email.
To view it online, please go here:
http://www.promosender.info/news/display.php?M=8524798C=923e0e1f13557000c9932ffdcf39e93eS=48L=28N=7


To stop receiving these
emails:http://www.promosender.info/news/unsubscribe.php?M=8524798C=923e0e1f13557000c9932ffdcf39e93eL=28N=48
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Votre devis alarme est disponible

2012-08-19 Thread Expert protection par Planduweb
Pour voir le message, veuillez utiliser un lecteur de mail compatible HTML

Lien miroir : 
http://m10-fr.com/mc10_m/YT0xMyZiPTE3NDI2JmM9NDgzNjEyJmQ9MjAxMi0wOC0yMCAwMDoyMDowMSZlPTEmaD0xNzQyNSZmPTE3NDI2Jmc9MTc0MjY=

Lien de désinscription : 
http://m10-fr.com/mc10_unsub/YT0xMyZiPTE3NDI2JmM9NDgzNjEyJmQ9MjAxMi0wOC0yMCAwMDoyMDowMSZlPTEmaD0xNzQyNSZmPTE3NDI2Jmc9MTc0MjY=


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general