staging: vme: remove unreachable code
authorManohar Vanga <manohar.vanga@cern.ch>
Sat, 26 Feb 2011 22:36:15 +0000 (23:36 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 28 Feb 2011 21:30:07 +0000 (13:30 -0800)
Remove some unreachable code (kfree calls) from vme.c

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vme/vme.c

index c1ec230f005a56ed06792c96c0351d700a4b48f9..c078ce369df9498da3fe2b760eb4c755c20a3133 100644 (file)
@@ -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: