netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jiazhouyang09@gmail.com
Cc: santosh@chelsio.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: cxgb3: add error handling for sysfs_create_group
Date: Thu, 14 Jun 2018 19:00:18 -0700 (PDT)	[thread overview]
Message-ID: <20180614.190018.1696051015226293779.davem@davemloft.net> (raw)
In-Reply-To: <1528984571-53320-1-git-send-email-jiazhouyang09@gmail.com>

From: Zhouyang Jia <jiazhouyang09@gmail.com>
Date: Thu, 14 Jun 2018 21:56:11 +0800

> diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
> index 2edfdbd..73d6aa9 100644
> --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
> +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
> @@ -3362,6 +3362,10 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	err = sysfs_create_group(&adapter->port[0]->dev.kobj,
>  				 &cxgb3_attr_group);
> +	if (err) {
> +		dev_err(&pdev->dev, "cannot create sysfs group\n");
> +		goto out_free_dev;
> +	}

You have to do more than this to cleanup.  For example, you have to
change the LED state back, as it has just been set to indicate that
the interface is operational.

  reply	other threads:[~2018-06-15  2:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 13:56 [PATCH] net: cxgb3: add error handling for sysfs_create_group Zhouyang Jia
2018-06-15  2:00 ` David Miller [this message]
2018-06-15  3:06 ` [PATCH v2] " Zhouyang Jia
2018-06-15 16:15   ` David Miller

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=20180614.190018.1696051015226293779.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jiazhouyang09@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=santosh@chelsio.com \
    /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;
as well as URLs for NNTP newsgroup(s).