# \[PATCH 1/1\] ssb: remove unncessary out label

- Subsystems: SONICS SILICON BACKPLANE DRIVER (SSB), THE REST
- Maintainers: Michael Buesch, Linus Torvalds
- Status: REVIEWED: 1 (0M) (Rohit Thapliyal)
- Reviewed.
- 1 review trailer.
- List: netdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/netdev/2015/06/4519313/t

## \[PATCH 1/1\] ssb: remove unncessary out label

- From: Maninder Singh \<hidden\>
- Date: 2015-06-19 08:54:27 
- Message: https://ratatoskr.run/netdev/2015/06/4519313.md

```text
This patch removes unnecessary label "out" and
some restructring for using device_create_file directly.

Signed-off-by: Maninder Singh <redacted>
Reviewed-by: Rohit Thapliyal <redacted>
---
 drivers/ssb/pci.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 0f28c08..d6ca4d3 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -1173,17 +1173,11 @@ void ssb_pci_exit(struct ssb_bus *bus)
 int ssb_pci_init(struct ssb_bus *bus)
 {
 	struct pci_dev *pdev;
-	int err;
 
 	if (bus->bustype != SSB_BUSTYPE_PCI)
 		return 0;
 
 	pdev = bus->host_pci;
 	mutex_init(&bus->sprom_mutex);
-	err = device_create_file(&pdev->dev, &dev_attr_ssb_sprom);
-	if (err)
-		goto out;
-
-out:
-	return err;
+	return device_create_file(&pdev->dev, &dev_attr_ssb_sprom);
 }
-- 
1.7.1
```

## Re: \[PATCH 1/1\] ssb: remove unncessary out label

- From: Michael Büsch \<m@bues.ch\>
- Date: 2015-06-19 15:13:48 
- Message: https://ratatoskr.run/netdev/2015/06/4519508.md

```text
On Fri, 19 Jun 2015 14:23:45 +0530
Maninder Singh [ref] wrote:

> This patch removes unnecessary label "out" and
> some restructring for using device_create_file directly.
> 
> Signed-off-by: Maninder Singh <redacted>
> Reviewed-by: Rohit Thapliyal <redacted>
> ---
>  drivers/ssb/pci.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
> index 0f28c08..d6ca4d3 100644
> --- a/drivers/ssb/pci.c
> +++ b/drivers/ssb/pci.c
> @@ -1173,17 +1173,11 @@ void ssb_pci_exit(struct ssb_bus *bus)
>  int ssb_pci_init(struct ssb_bus *bus)
>  {
>  	struct pci_dev *pdev;
> -	int err;
>  
>  	if (bus->bustype != SSB_BUSTYPE_PCI)
>  		return 0;
>  
>  	pdev = bus->host_pci;
>  	mutex_init(&bus->sprom_mutex);
> -	err = device_create_file(&pdev->dev, &dev_attr_ssb_sprom);
> -	if (err)
> -		goto out;
> -
> -out:
> -	return err;
> +	return device_create_file(&pdev->dev, &dev_attr_ssb_sprom);
>  }


I don't really think this change adds any value, but if you insist on
it you get my acked-by.


-- 
Michael
```
