diff mbox series

[09/17] mtd: rawnand: cafe: Get rid of a useless label

Message ID 20200427082028.394719-10-boris.brezillon@collabora.com
State Changes Requested
Delegated to: Miquel Raynal
Headers show
Series mtd: rawnand: cafe: Convert to exec_op() (and more) | expand

Commit Message

Boris Brezillon April 27, 2020, 8:20 a.m. UTC
We can return 0 directly instead of branching to the out label.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/mtd/nand/raw/cafe_nand.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Miquel Raynal April 27, 2020, 7:47 p.m. UTC | #1
Hi Boris,

Boris Brezillon <boris.brezillon@collabora.com> wrote on Mon, 27 Apr
2020 10:20:19 +0200:

> We can return 0 directly instead of branching to the out label.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  drivers/mtd/nand/raw/cafe_nand.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
> index 3eab57e63215..348debbc04af 100644
> --- a/drivers/mtd/nand/raw/cafe_nand.c
> +++ b/drivers/mtd/nand/raw/cafe_nand.c
> @@ -932,7 +932,7 @@ static int cafe_nand_probe(struct pci_dev *pdev,
>  	if (err)
>  		goto out_cleanup_nand;
>  
> -	goto out;
> +	return 0;
>  
>   out_cleanup_nand:
>  	nand_cleanup(&cafe->nand);
> @@ -943,7 +943,6 @@ static int cafe_nand_probe(struct pci_dev *pdev,
>  		    GLOBAL_IRQ_MASK);
>   out_ior:
>  	pci_iounmap(pdev, cafe->mmio);
> - out:
>  	return err;
>  }
>  


Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>


Thanks,
Miquèl
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
index 3eab57e63215..348debbc04af 100644
--- a/drivers/mtd/nand/raw/cafe_nand.c
+++ b/drivers/mtd/nand/raw/cafe_nand.c
@@ -932,7 +932,7 @@  static int cafe_nand_probe(struct pci_dev *pdev,
 	if (err)
 		goto out_cleanup_nand;
 
-	goto out;
+	return 0;
 
  out_cleanup_nand:
 	nand_cleanup(&cafe->nand);
@@ -943,7 +943,6 @@  static int cafe_nand_probe(struct pci_dev *pdev,
 		    GLOBAL_IRQ_MASK);
  out_ior:
 	pci_iounmap(pdev, cafe->mmio);
- out:
 	return err;
 }