From 2b20e4afacf902a87298fe643c900befd2f06cbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Thu, 3 Nov 2011 21:34:00 +0100 Subject: [PATCH] at91sam9: fix broken error propagation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I3288ce6f7642e519c26dd099be888a395fe1de94 Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/159 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/flash/nand/at91sam9.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/flash/nand/at91sam9.c b/src/flash/nand/at91sam9.c index 3ca9c39f..6648953e 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); -- 2.39.5