Re: [PATCH] staging: xillybus: Consolidate return statements in xilly_probe()

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

 



Hi Eli

On 2014-06-18 at 14:30:35 +0200, Eli Billauer <eli.billauer@xxxxxxxxx> wrote:
> Hello,
> 
> Thanks for the patch. However in the patch I'm trying to push,
> xillybus_do_cleanup() is eliminated completely from the code (with
> no success so far, because it depends on inserting a patch that adds
> a devres version of dma_map_single).
> 
> See https://lkml.org/lkml/2014/6/1/10
> 
> So your patch makes sense, and I have no objection to it, but it
> fixes a piece of code that must go away soon anyhow.

Thanks for the notice. I wasn't aware of your pending changes. I'll
leave it up to Greg to decide whether it makes sense to apply the patch
for the time being.

Thanks
Tobias

> Thanks,
>    Eli
> 
> On 18/06/14 15:10, Tobias Klauser wrote:
> >No need for two return statements, just call xillybus_do_cleanup() in
> >case of an error before returning.
> >
> >Signed-off-by: Tobias Klauser<tklauser@xxxxxxxxxx>
> >---
> >  drivers/staging/xillybus/xillybus_pcie.c |    7 ++-----
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> >
> >diff --git a/drivers/staging/xillybus/xillybus_pcie.c b/drivers/staging/xillybus/xillybus_pcie.c
> >index a4fe51c..518ba6c 100644
> >--- a/drivers/staging/xillybus/xillybus_pcie.c
> >+++ b/drivers/staging/xillybus/xillybus_pcie.c
> >@@ -200,11 +200,8 @@ static int xilly_probe(struct pci_dev *pdev,
> >  	}
> >
> >  	rc = xillybus_endpoint_discovery(endpoint);
> >-
> >-	if (!rc)
> >-		return 0;
> >-
> >-	xillybus_do_cleanup(&endpoint->cleanup, endpoint);
> >+	if (rc)
> >+		xillybus_do_cleanup(&endpoint->cleanup, endpoint);
> >
> >  	return rc;
> >  }
> >
> 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux