mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* serial S3: fix local structure malloc
@ 2012-03-12 13:57 Juergen Beisert
  2012-03-13 12:24 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Beisert @ 2012-03-12 13:57 UTC (permalink / raw)
  To: barebox

Patch 2c5404651091e985c9009aa417d80fdaf50d7a68 introduces a private structure
for the S3C based UARTs but still reserves the memory for the smaller
structure which fails at runtime.
    
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

diff --git a/drivers/serial/serial_s3c.c b/drivers/serial/serial_s3c.c
index a5fd4ee..2bdc1df 100644
--- a/drivers/serial/serial_s3c.c
+++ b/drivers/serial/serial_s3c.c
@@ -153,7 +153,7 @@ static int s3c_serial_probe(struct device_d *dev)
 	struct s3c_uart *priv;
 	struct console_device *cdev;
 
-	priv = xzalloc(sizeof(struct console_device));
+	priv = xzalloc(sizeof(struct s3c_uart));
 	cdev = &priv->cdev;
 	priv->regs = dev_request_mem_region(dev, 0);
 	dev->priv = priv;

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-13 12:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 13:57 serial S3: fix local structure malloc Juergen Beisert
2012-03-13 12:24 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox