This patchset gets rid of more unreachable code in vme.c. The removed
lines are unreachable calls to kfree.
If there are any more that I didn't catch, please let me know.
Thanks,
Manohar Vanga
Manohar Vanga (1):
staging: vme: remove unreachable code
drivers/staging/vme/vme.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
Remove some unreachable code (kfree calls) from vme.c
Signed-off-by: Manohar Vanga <[email protected]>
---
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
On 26/02/11 22:36, Manohar Vanga wrote:
> Remove some unreachable code (kfree calls) from vme.c
>
> Signed-off-by: Manohar Vanga <[email protected]>
Acked-by: Martyn Welch <[email protected]>
> ---
> 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 [email protected] | M2 3AB VAT:GB 927559189