Merged in jgraef-linetco/nuttx/bugfix/up_dma2dcreatelayer-return-value (pull request #142)

dma2d: fix an error in up_dma2dcreatelayer where an invalid pointer was returned when a certain underlying function failed.
This commit is contained in:
Gregory Nutt 2016-10-07 07:42:34 -06:00
commit 18791db758

View File

@ -2069,6 +2069,7 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width,
/* free the layer struture */
kmm_free(layer);
layer = NULL;
lcderr("ERROR: ENOMEM, Unable to allocate layer buffer\n");
errno = ENOMEM;
}