dma2d: fix an error in up_dma2dcreatelayer where an invalid pointer was returned when a certain underlying function failed.

This commit is contained in:
Jens Gräf 2016-10-07 13:42:24 +02:00
parent 49ee2631f7
commit 1d3abd17cc

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;
}