mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Eric Benard <eric@eukrea.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] Fix a data abort with fec_imx
Date: Mon, 11 Jan 2010 18:58:35 +0100	[thread overview]
Message-ID: <20100111175835.GY6923@pengutronix.de> (raw)
In-Reply-To: <1263220335-26307-1-git-send-email-eric@eukrea.com>

On Mon, Jan 11, 2010 at 03:32:15PM +0100, Eric Benard wrote:
> From: Eric Benard <ebenard@1720eb.(none)>
> 
> edev was allocated using malloc. On one board (NOR boot), we met data abort
> in eth_register (at dev_add_param(dev, &edev->param_ip);).
> Allocating edev with xzalloc (as in several other drivers) fixed the problem.

Ok, applied.

Sascha

> 
> Signed-off-by: Eric Benard <eric@eukrea.com>
> ---
>  drivers/net/fec_imx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
> index 4893291..49140e7 100644
> --- a/drivers/net/fec_imx.c
> +++ b/drivers/net/fec_imx.c
> @@ -542,7 +542,7 @@ static int fec_probe(struct device_d *dev)
>  #ifdef CONFIG_ARCH_IMX27
>  	PCCR0 |= PCCR0_FEC_EN;
>  #endif
> -        edev = (struct eth_device *)malloc(sizeof(struct eth_device));
> +        edev = (struct eth_device *)xzalloc(sizeof(struct eth_device));
>          dev->type_data = edev;
>  	fec = (struct fec_priv *)malloc(sizeof(*fec));
>          edev->priv = fec;
> -- 
> 1.6.3.3
> 
> 

-- 
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

      reply	other threads:[~2010-01-11 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 14:32 Eric Benard
2010-01-11 17:58 ` Sascha Hauer [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=20100111175835.GY6923@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eric@eukrea.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