No need to check for the result and increases the chance that we build a binary without the rarely used calloc function. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/serial/serial_ns16550.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index 290619f..ab172e7 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -211,9 +211,7 @@ static int ns16550_probe(struct device_d *dev) if ((plat->reg_read == NULL) || (plat->reg_write == NULL)) return -EINVAL; - cdev = calloc(1, sizeof(struct console_device)); - if (cdev == NULL) - return -ENOMEM; + cdev = xzalloc(sizeof(*cdev)); dev->type_data = cdev; cdev->dev = dev; -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox