netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ssb: remove unncessary out label
@ 2015-06-19  8:53 Maninder Singh
  2015-06-19 15:13 ` Michael Büsch
  0 siblings, 1 reply; 3+ messages in thread
From: Maninder Singh @ 2015-06-19  8:53 UTC (permalink / raw)
  To: m, netdev, linux-kernel; +Cc: pankaj.m, Maninder Singh

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

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Rohit Thapliyal <r.thapliyal@samsung.com>
---
 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

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

* Re: [PATCH 1/1] ssb: remove unncessary out label
  2015-06-19  8:53 [PATCH 1/1] ssb: remove unncessary out label Maninder Singh
@ 2015-06-19 15:13 ` Michael Büsch
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Büsch @ 2015-06-19 15:13 UTC (permalink / raw)
  To: Maninder Singh; +Cc: netdev, linux-kernel, pankaj.m

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

On Fri, 19 Jun 2015 14:23:45 +0530
Maninder Singh <maninder1.s@samsung.com> wrote:

> This patch removes unnecessary label "out" and
> some restructring for using device_create_file directly.
> 
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Rohit Thapliyal <r.thapliyal@samsung.com>
> ---
>  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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] ssb: remove unncessary out label
@ 2015-06-22  3:47 Maninder Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Maninder Singh @ 2015-06-22  3:47 UTC (permalink / raw)
  To: Michael B?ch
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	PANKAJ MISHRA

Hi Michael,

>>  	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.

Yes You are right, But By this change code looks simpler.
Thats why i suggested the changes.

Thanks
Maninder

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

end of thread, other threads:[~2015-06-22  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19  8:53 [PATCH 1/1] ssb: remove unncessary out label Maninder Singh
2015-06-19 15:13 ` Michael Büsch
  -- strict thread matches above, loose matches on Subject: below --
2015-06-22  3:47 Maninder Singh

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).