From: Andy Gross Date: Tue, 13 Nov 2012 21:41:32 +0000 (-0600) Subject: staging: drm/omap: Fix usage of IS_ERR_OR_NULL and PTR_ERR X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=743815ae1bbd2790321a3ab1f23abb82c1fdd45b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: drm/omap: Fix usage of IS_ERR_OR_NULL and PTR_ERR Return PTR_ERR(-ENOMEM) if dmm_txn_init cannot allocate a refill engine. Signed-off-by: Andy Gross Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c index 4d138df369b3..5c809c056859 100644 --- a/drivers/staging/omapdrm/omap_dmm_tiler.c +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c @@ -296,7 +296,7 @@ static int fill(struct tcm_area *area, struct page **pages, txn = dmm_txn_init(omap_dmm, area->tcm); if (IS_ERR_OR_NULL(txn)) - return PTR_ERR(txn); + return PTR_ERR(-ENOMEM); tcm_for_each_slice(slice, *area, area_s) { struct pat_area p_area = {