linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] PCI: loongson: simplify the return expression of loongson_pci_probe()
@ 2020-09-21 13:10 Qinglang Miao
  2020-10-01 14:39 ` Rob Herring
  2020-10-02 11:57 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Qinglang Miao

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/pci/controller/pci-loongson.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/pci/controller/pci-loongson.c b/drivers/pci/controller/pci-loongson.c
index 719c19fe2..48169b1e3 100644
--- a/drivers/pci/controller/pci-loongson.c
+++ b/drivers/pci/controller/pci-loongson.c
@@ -183,7 +183,6 @@ static int loongson_pci_probe(struct platform_device *pdev)
 	struct device_node *node = dev->of_node;
 	struct pci_host_bridge *bridge;
 	struct resource *regs;
-	int err;
 
 	if (!node)
 		return -ENODEV;
@@ -222,11 +221,7 @@ static int loongson_pci_probe(struct platform_device *pdev)
 	bridge->ops = &loongson_pci_ops;
 	bridge->map_irq = loongson_map_irq;
 
-	err = pci_host_probe(bridge);
-	if (err)
-		return err;
-
-	return 0;
+	return pci_host_probe(bridge);
 }
 
 static struct platform_driver loongson_pci_driver = {
-- 
2.23.0


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

* Re: [PATCH -next] PCI: loongson: simplify the return expression of loongson_pci_probe()
  2020-09-21 13:10 [PATCH -next] PCI: loongson: simplify the return expression of loongson_pci_probe() Qinglang Miao
@ 2020-10-01 14:39 ` Rob Herring
  2020-10-02 11:57 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-10-01 14:39 UTC (permalink / raw)
  To: Qinglang Miao; +Cc: linux-kernel, Lorenzo Pieralisi, Bjorn Helgaas, linux-pci

On Mon, 21 Sep 2020 21:10:54 +0800, Qinglang Miao wrote:
> Simplify the return expression.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/pci/controller/pci-loongson.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH -next] PCI: loongson: simplify the return expression of loongson_pci_probe()
  2020-09-21 13:10 [PATCH -next] PCI: loongson: simplify the return expression of loongson_pci_probe() Qinglang Miao
  2020-10-01 14:39 ` Rob Herring
@ 2020-10-02 11:57 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2020-10-02 11:57 UTC (permalink / raw)
  To: Qinglang Miao; +Cc: Rob Herring, Bjorn Helgaas, linux-pci, linux-kernel

On Mon, Sep 21, 2020 at 09:10:54PM +0800, Qinglang Miao wrote:
> Simplify the return expression.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/pci/controller/pci-loongson.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)

Applied to pci/loongson, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/pci-loongson.c b/drivers/pci/controller/pci-loongson.c
> index 719c19fe2..48169b1e3 100644
> --- a/drivers/pci/controller/pci-loongson.c
> +++ b/drivers/pci/controller/pci-loongson.c
> @@ -183,7 +183,6 @@ static int loongson_pci_probe(struct platform_device *pdev)
>  	struct device_node *node = dev->of_node;
>  	struct pci_host_bridge *bridge;
>  	struct resource *regs;
> -	int err;
>  
>  	if (!node)
>  		return -ENODEV;
> @@ -222,11 +221,7 @@ static int loongson_pci_probe(struct platform_device *pdev)
>  	bridge->ops = &loongson_pci_ops;
>  	bridge->map_irq = loongson_map_irq;
>  
> -	err = pci_host_probe(bridge);
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return pci_host_probe(bridge);
>  }
>  
>  static struct platform_driver loongson_pci_driver = {
> -- 
> 2.23.0
> 

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

end of thread, other threads:[~2020-10-02 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] PCI: loongson: simplify the return expression of loongson_pci_probe() Qinglang Miao
2020-10-01 14:39 ` Rob Herring
2020-10-02 11:57 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).