mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Daeseok Youn <daeseok.youn@gmail.com>
Cc: lidza.louina@gmail.com, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: dgap: make dgap_found_board() return a brd pointer
Date: Fri, 20 Jun 2014 12:09:37 +0300	[thread overview]
Message-ID: <20140620090937.GS5500@mwanda> (raw)
In-Reply-To: <20140620051958.GA17076@devel.8.8.4.4>

On Fri, Jun 20, 2014 at 02:19:58PM +0900, Daeseok Youn wrote:
> -	rc = dgap_found_board(pdev, ent->driver_data, dgap_numboards);
> -	if (rc)
> +	brd = dgap_found_board(pdev, ent->driver_data, dgap_numboards);
> +	if (IS_ERR(brd))
>  		return rc;

		return ERR_PTR(brd);


>  
> -	brd = dgap_board[dgap_numboards++];
>  	rc = dgap_firmware_load(pdev, ent->driver_data, brd);
>  	if (rc)
>  		goto cleanup_brd;
> @@ -617,6 +617,8 @@ static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	brd->state = BOARD_READY;
>  	brd->dpastatus = BD_RUNNING;
>  
> +	dgap_board[dgap_numboards++] = brd;

You need to update the error handling of this function to remove the
reference do dgap_board[] as well.

> +
>  	return 0;
>  

regards,
dan carpenter


  reply	other threads:[~2014-06-20  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20  5:19 Daeseok Youn
2014-06-20  9:09 ` Dan Carpenter [this message]
2014-06-20  9:17   ` DaeSeok Youn

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=20140620090937.GS5500@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=daeseok.youn@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lidza.louina@gmail.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®