at91sam9: fix broken error propagation
Change-Id: I3288ce6f7642e519c26dd099be888a395fe1de94 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/159 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
parent
cb38df20dc
commit
2b20e4afac
|
@ -348,6 +348,7 @@ static uint8_t * at91sam9_oob_init(struct nand_device *nand, uint8_t *oob, uint3
|
||||||
oob = malloc(*size);
|
oob = malloc(*size);
|
||||||
if (!oob) {
|
if (!oob) {
|
||||||
LOG_ERROR("Unable to allocate space for OOB");
|
LOG_ERROR("Unable to allocate space for OOB");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(oob, 0xFF, *size);
|
memset(oob, 0xFF, *size);
|
||||||
|
|
Loading…
Reference in New Issue