linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kjlu@umn.edu
Cc: pakki001@umn.edu, ulf.hansson@linaro.org, dchickles@marvell.com,
	sburla@marvell.com, fmanlunas@marvell.com,
	linus.walleij@linaro.org,
	laurent.pinchart+renesas@ideasonboard.com, j.neuschaefer@gmx.net,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: liquidio: fix NULL pointer dereferences
Date: Mon, 25 Mar 2019 17:14:28 -0700 (PDT)	[thread overview]
Message-ID: <20190325.171428.816775455885557497.davem@davemloft.net> (raw)
In-Reply-To: <20190323032420.21162-1-kjlu@umn.edu>

From: Kangjie Lu <kjlu@umn.edu>
Date: Fri, 22 Mar 2019 22:24:19 -0500

> In case octeon_alloc_soft_command fails, the fix reports the
> error and goes to cleanup to avoid NULL pointer dereferences.
> 
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> V2: goto setup_nic_dev_free for cleanup
> ---
>  drivers/mmc/host/mmc_spi.c                         |  2 +-
>  drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 12 ++++++++++++
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
> index 32fea585262b..a3533935e282 100644
> --- a/drivers/mmc/host/mmc_spi.c
> +++ b/drivers/mmc/host/mmc_spi.c
> @@ -820,7 +820,7 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t,
>  
>  	status = spi_sync_locked(spi, &host->m);
>  	if (status < 0) {
> -		dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status);
> +		dev_dbg(&spi->dev, "read error %d\n", status);
>  		return status;
>  	}

This is:

1) Unrelated to your bug fix.

2) It is often the case that people print values in hex and decimal
   intentionally for debugging.  I've done this myself countless
   times.

      parent reply	other threads:[~2019-03-26  0:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11  5:46 [PATCH] net: liquidio: fix NULL pointer dereferences Kangjie Lu
2019-03-11 19:17 ` David Miller
2019-03-12  5:26   ` Kangjie Lu
2019-03-23  3:24   ` [PATCH v2] " Kangjie Lu
2019-03-25 12:41     ` Ulf Hansson
2019-03-26  0:14     ` David Miller [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=20190325.171428.816775455885557497.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dchickles@marvell.com \
    --cc=fmanlunas@marvell.com \
    --cc=j.neuschaefer@gmx.net \
    --cc=kjlu@umn.edu \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pakki001@umn.edu \
    --cc=sburla@marvell.com \
    --cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).