From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Philippe Rétornaz" <philippe.retornaz@epfl.ch>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1] cfi_flash: fix NULL pointer dereference
Date: Fri, 28 Feb 2014 09:03:50 +0100 [thread overview]
Message-ID: <20140228080350.GW17250@pengutronix.de> (raw)
In-Reply-To: <1393351516-1136-1-git-send-email-philippe.retornaz@epfl.ch>
On Tue, Feb 25, 2014 at 07:05:16PM +0100, Philippe Rétornaz wrote:
> We need to setup the info->dev pointer before flash_get_size() since it
> might use it for dev_dbg().
> This fix a crash on boot when debug output is enabled.
>
> Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Applied thanks. Sorry for the delay, this patch was buried in my
mailbox.
Sascha
> ---
> drivers/mtd/nor/cfi_flash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c
> index 514eab5..3d3d231 100644
> --- a/drivers/mtd/nor/cfi_flash.c
> +++ b/drivers/mtd/nor/cfi_flash.c
> @@ -978,8 +978,8 @@ static int cfi_probe (struct device_d *dev)
> info->flash_id = FLASH_UNKNOWN;
> info->cmd_reset = FLASH_CMD_RESET;
> info->base = dev_request_mem_region(dev, 0);
> - info->size = flash_get_size(info);
> info->dev = dev;
> + info->size = flash_get_size(info);
>
> if (info->flash_id == FLASH_UNKNOWN) {
> dev_warn(dev, "## Unknown FLASH on Bank at 0x%08x - Size = 0x%08lx = %ld MB\n",
> --
> 1.7.9.5
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next parent reply other threads:[~2014-02-28 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1393351516-1136-1-git-send-email-philippe.retornaz@epfl.ch>
2014-02-28 8:03 ` Sascha Hauer [this message]
2014-02-28 8:07 ` Alexander Aring
2014-02-28 8:23 ` Sascha Hauer
2014-02-28 8:32 ` Philippe Rétornaz
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=20140228080350.GW17250@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=philippe.retornaz@epfl.ch \
/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