public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] staging: vme: remove unreachable code
  2011-02-26 22:36 [PATCH 0/1] " Manohar Vanga
@ 2011-02-26 22:36 ` Manohar Vanga
  2011-03-01 15:34   ` Martyn Welch
  0 siblings, 1 reply; 5+ messages in thread
From: Manohar Vanga @ 2011-02-26 22:36 UTC (permalink / raw)
  To: martyn.welch; +Cc: gregkh, wfp5p, cota, devel, linux-kernel, Manohar Vanga

Remove some unreachable code (kfree calls) from vme.c

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
---
 drivers/staging/vme/vme.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
index d9fc864..bbf58dc 100644
--- a/drivers/staging/vme/vme.c
+++ b/drivers/staging/vme/vme.c
@@ -441,7 +441,6 @@ struct vme_resource *vme_master_request(struct device *dev,
 
 	return resource;
 
-	kfree(resource);
 err_alloc:
 	/* Unlock image */
 	spin_lock(&master_image->lock);
@@ -768,7 +767,6 @@ struct vme_dma_attr *vme_dma_pattern_attribute(u32 pattern,
 
 	return attributes;
 
-	kfree(pattern_attr);
 err_pat:
 	kfree(attributes);
 err_attr:
@@ -809,7 +807,6 @@ struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t address)
 
 	return attributes;
 
-	kfree(pci_attr);
 err_pci:
 	kfree(attributes);
 err_attr:
@@ -851,7 +848,6 @@ struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long address,
 
 	return attributes;
 
-	kfree(vme_attr);
 err_vme:
 	kfree(attributes);
 err_attr:
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 0/1] staging: vme: remove some more unreachable code
@ 2011-02-26 23:15 Manohar Vanga
  2011-02-26 23:15 ` [PATCH 1/1] staging: vme: remove " Manohar Vanga
  0 siblings, 1 reply; 5+ messages in thread
From: Manohar Vanga @ 2011-02-26 23:15 UTC (permalink / raw)
  To: martyn.welch; +Cc: gregkh, julia, cota, devel, linux-kernel, Manohar Vanga

This patch removes some more unreachable code found in 
bridges/vme_ca91cx42.c and bridges/vme_tsi148.c.

Thanks,
Manohar Vanga

Manohar Vanga (1):
  staging: vme: remove unreachable code

 drivers/staging/vme/bridges/vme_ca91cx42.c |    3 ---
 drivers/staging/vme/bridges/vme_tsi148.c   |    2 --
 2 files changed, 0 insertions(+), 5 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] staging: vme: remove unreachable code
  2011-02-26 23:15 [PATCH 0/1] staging: vme: remove some more unreachable code Manohar Vanga
@ 2011-02-26 23:15 ` Manohar Vanga
  2011-03-01 15:35   ` Martyn Welch
  0 siblings, 1 reply; 5+ messages in thread
From: Manohar Vanga @ 2011-02-26 23:15 UTC (permalink / raw)
  To: martyn.welch; +Cc: gregkh, julia, cota, devel, linux-kernel, Manohar Vanga

Remove some more unreachable code found in bridges/vme_ca91cx42.c
and bridges/vme_tsi148.c

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
---
 drivers/staging/vme/bridges/vme_ca91cx42.c |    3 ---
 drivers/staging/vme/bridges/vme_tsi148.c   |    2 --
 2 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index 42de83e..5d734d9 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -560,8 +560,6 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
 
 	return 0;
 
-	iounmap(image->kern_base);
-	image->kern_base = NULL;
 err_remap:
 	release_resource(&image->bus_resource);
 err_resource:
@@ -1782,7 +1780,6 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	return 0;
 
-	vme_unregister_bridge(ca91cx42_bridge);
 err_reg:
 	ca91cx42_crcsr_exit(ca91cx42_bridge, pdev);
 err_lm:
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c
index 26ea42f..2df19ea 100644
--- a/drivers/staging/vme/bridges/vme_tsi148.c
+++ b/drivers/staging/vme/bridges/vme_tsi148.c
@@ -869,8 +869,6 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
 
 	return 0;
 
-	iounmap(image->kern_base);
-	image->kern_base = NULL;
 err_remap:
 	release_resource(&image->bus_resource);
 err_resource:
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] staging: vme: remove unreachable code
  2011-02-26 22:36 ` [PATCH 1/1] " Manohar Vanga
@ 2011-03-01 15:34   ` Martyn Welch
  0 siblings, 0 replies; 5+ messages in thread
From: Martyn Welch @ 2011-03-01 15:34 UTC (permalink / raw)
  To: Manohar Vanga; +Cc: gregkh, wfp5p, cota, devel, linux-kernel

On 26/02/11 22:36, Manohar Vanga wrote:
> Remove some unreachable code (kfree calls) from vme.c
> 
> Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>

Acked-by: Martyn Welch <martyn.welch@ge.com>

> ---
>  drivers/staging/vme/vme.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> index d9fc864..bbf58dc 100644
> --- a/drivers/staging/vme/vme.c
> +++ b/drivers/staging/vme/vme.c
> @@ -441,7 +441,6 @@ struct vme_resource *vme_master_request(struct device *dev,
>  
>  	return resource;
>  
> -	kfree(resource);
>  err_alloc:
>  	/* Unlock image */
>  	spin_lock(&master_image->lock);
> @@ -768,7 +767,6 @@ struct vme_dma_attr *vme_dma_pattern_attribute(u32 pattern,
>  
>  	return attributes;
>  
> -	kfree(pattern_attr);
>  err_pat:
>  	kfree(attributes);
>  err_attr:
> @@ -809,7 +807,6 @@ struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t address)
>  
>  	return attributes;
>  
> -	kfree(pci_attr);
>  err_pci:
>  	kfree(attributes);
>  err_attr:
> @@ -851,7 +848,6 @@ struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long address,
>  
>  	return attributes;
>  
> -	kfree(vme_attr);
>  err_vme:
>  	kfree(attributes);
>  err_attr:


-- 
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)127322748                          | Barbirolli Square, Manchester,
E martyn.welch@ge.com                      | M2 3AB  VAT:GB 927559189

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] staging: vme: remove unreachable code
  2011-02-26 23:15 ` [PATCH 1/1] staging: vme: remove " Manohar Vanga
@ 2011-03-01 15:35   ` Martyn Welch
  0 siblings, 0 replies; 5+ messages in thread
From: Martyn Welch @ 2011-03-01 15:35 UTC (permalink / raw)
  To: Manohar Vanga; +Cc: gregkh, julia, cota, devel, linux-kernel

On 26/02/11 23:15, Manohar Vanga wrote:
> Remove some more unreachable code found in bridges/vme_ca91cx42.c
> and bridges/vme_tsi148.c
> 
> Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>

Acked-by Martyn Welch <martyn.welch@ge.com>

> ---
>  drivers/staging/vme/bridges/vme_ca91cx42.c |    3 ---
>  drivers/staging/vme/bridges/vme_tsi148.c   |    2 --
>  2 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
> index 42de83e..5d734d9 100644
> --- a/drivers/staging/vme/bridges/vme_ca91cx42.c
> +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
> @@ -560,8 +560,6 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
>  
>  	return 0;
>  
> -	iounmap(image->kern_base);
> -	image->kern_base = NULL;
>  err_remap:
>  	release_resource(&image->bus_resource);
>  err_resource:
> @@ -1782,7 +1780,6 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  	return 0;
>  
> -	vme_unregister_bridge(ca91cx42_bridge);
>  err_reg:
>  	ca91cx42_crcsr_exit(ca91cx42_bridge, pdev);
>  err_lm:
> diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c
> index 26ea42f..2df19ea 100644
> --- a/drivers/staging/vme/bridges/vme_tsi148.c
> +++ b/drivers/staging/vme/bridges/vme_tsi148.c
> @@ -869,8 +869,6 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
>  
>  	return 0;
>  
> -	iounmap(image->kern_base);
> -	image->kern_base = NULL;
>  err_remap:
>  	release_resource(&image->bus_resource);
>  err_resource:


-- 
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)127322748                          | Barbirolli Square, Manchester,
E martyn.welch@ge.com                      | M2 3AB  VAT:GB 927559189

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-01 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-26 23:15 [PATCH 0/1] staging: vme: remove some more unreachable code Manohar Vanga
2011-02-26 23:15 ` [PATCH 1/1] staging: vme: remove " Manohar Vanga
2011-03-01 15:35   ` Martyn Welch
  -- strict thread matches above, loose matches on Subject: below --
2011-02-26 22:36 [PATCH 0/1] " Manohar Vanga
2011-02-26 22:36 ` [PATCH 1/1] " Manohar Vanga
2011-03-01 15:34   ` Martyn Welch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox