From: Øyvind Harboe Date: Thu, 3 Nov 2011 20:34:00 +0000 (+0100) Subject: at91sam9: fix broken error propagation X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=2b20e4afacf902a87298fe643c900befd2f06cbe;p=fw%2Fopenocd at91sam9: fix broken error propagation Change-Id: I3288ce6f7642e519c26dd099be888a395fe1de94 Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/159 Tested-by: jenkins Reviewed-by: Spencer Oliver --- diff --git a/src/flash/nand/at91sam9.c b/src/flash/nand/at91sam9.c index 3ca9c39f1..6648953e2 100644 --- a/src/flash/nand/at91sam9.c +++ b/src/flash/nand/at91sam9.c @@ -348,6 +348,7 @@ static uint8_t * at91sam9_oob_init(struct nand_device *nand, uint8_t *oob, uint3 oob = malloc(*size); if (!oob) { LOG_ERROR("Unable to allocate space for OOB"); + return NULL; } memset(oob, 0xFF, *size);