public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rupesh Gujare <rupesh.gujare@atmel.com>
To: <devel@linuxdriverproject.org>
Cc: <gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <dan.carpenter@oracle.com>
Subject: Re: [PATCH] staging: ozwpan: Fix coding style.
Date: Thu, 25 Jul 2013 10:30:30 +0100	[thread overview]
Message-ID: <51F0F036.60808@atmel.com> (raw)
In-Reply-To: <1374674806-7790-1-git-send-email-rupesh.gujare@atmel.com>

On 24/07/13 15:06, Rupesh Gujare wrote:
> This patch fixes coding style issues reported by Dan here:-
> http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2012-June/027767.html
>
> Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
> ---
>   drivers/staging/ozwpan/ozcdev.c |   15 ++++++++-------
>   1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
> index 3e29760..73b582c 100644
> --- a/drivers/staging/ozwpan/ozcdev.c
> +++ b/drivers/staging/ozwpan/ozcdev.c
> @@ -333,10 +333,11 @@ int oz_cdev_register(void)
>   {
>   	int err;
>   	struct device *dev;
> +
>   	memset(&g_cdev, 0, sizeof(g_cdev));
>   	err = alloc_chrdev_region(&g_cdev.devnum, 0, 1, "ozwpan");
>   	if (err < 0)
> -		goto out3;
> +		return err;
>   	oz_dbg(ON, "Alloc dev number %d:%d\n",
>   	       MAJOR(g_cdev.devnum), MINOR(g_cdev.devnum));
>   	cdev_init(&g_cdev.cdev, &oz_fops);
> @@ -347,26 +348,26 @@ int oz_cdev_register(void)
>   	err = cdev_add(&g_cdev.cdev, g_cdev.devnum, 1);
>   	if (err < 0) {
>   		oz_dbg(ON, "Failed to add cdev\n");
> -		goto out2;
> +		goto unregister;
>   	}
>   	g_oz_class = class_create(THIS_MODULE, "ozmo_wpan");
>   	if (IS_ERR(g_oz_class)) {
>   		oz_dbg(ON, "Failed to register ozmo_wpan class\n");
>   		err = PTR_ERR(g_oz_class);
> -		goto out1;
> +		goto delete;
>   	}
>   	dev = device_create(g_oz_class, NULL, g_cdev.devnum, NULL, "ozwpan");
>   	if (IS_ERR(dev)) {
>   		oz_dbg(ON, "Failed to create sysfs entry for cdev\n");
>   		err = PTR_ERR(dev);
> -		goto out1;
> +		goto delete;
>   	}
>   	return 0;
> -out1:
> +
> +delete:
>   	cdev_del(&g_cdev.cdev);
> -out2:
> +unregister:
>   	unregister_chrdev_region(g_cdev.devnum, 1);
> -out3:
>   	return err;
>   }
>   /*------------------------------------------------------------------------------
Greg,

Did you missed this patch ? Or did I made another mistake. :( ?

-- 
Regards,
Rupesh Gujare


  reply	other threads:[~2013-07-25  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 14:06 [PATCH] staging: ozwpan: Fix coding style Rupesh Gujare
2013-07-25  9:30 ` Rupesh Gujare [this message]
2013-07-25 10:39   ` Dan Carpenter
2013-07-25 11:04     ` Rupesh Gujare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F0F036.60808@atmel.com \
    --to=rupesh.gujare@atmel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox