From: "Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
To: lidza.louina@gmail.com, markh@compro.net
Cc: gregkh@linuxfoundation.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
dan.carpenter@oracle.com
Subject: Re: [PATCH] dgnc: Don't save boards in memory that have failed to initialize
Date: Mon, 09 Mar 2015 18:18:40 +0200 [thread overview]
Message-ID: <54FDC7E0.9080502@gmail.com> (raw)
In-Reply-To: <1425914824-17488-1-git-send-email-giedrius.statkevicius@gmail.com>
On 2015.03.09 17:27, Giedrius Statkevičius wrote:
> Remove BOARD_FAILED and don't save dgnc_boards which failed to
> initialize.
>
> Assign the result of kzalloc() to brd in dgnc_found_board() and only put
> it in the dgnc_Board[] if it successfully initializes. Also, remove
> BOARD_FAILED enum and all ifs that check for it. Finally, remove one
> final place where state was set to BOARD_FAILED which was even redundant
> before this patch.
>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_driver.c | 19 ++-----------------
> drivers/staging/dgnc/dgnc_driver.h | 3 +--
> drivers/staging/dgnc/dgnc_mgmt.c | 5 +----
> drivers/staging/dgnc/dgnc_tty.c | 8 --------
> 4 files changed, 4 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index fa1ee79..c73dc1f 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -401,7 +401,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
> unsigned long flags;
>
> /* get the board structure and prep it */
> - dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(*brd), GFP_KERNEL);
> + brd = kzalloc(sizeof(*brd), GFP_KERNEL);
> brd = dgnc_Board[dgnc_NumBoards];
err, forgot to remove this here. Posting v2.
prev parent reply other threads:[~2015-03-09 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 15:27 [PATCH] dgnc: Don't save boards in memory that have failed to initialize Giedrius Statkevičius
2015-03-09 16:18 ` Giedrius Statkevičius [this message]
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=54FDC7E0.9080502@gmail.com \
--to=giedrius.statkevicius@gmail.com \
--cc=dan.carpenter@oracle.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 \
--cc=markh@compro.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.