staging: drm/omap: Fix usage of IS_ERR_OR_NULL and PTR_ERR
authorAndy Gross <andy.gross@ti.com>
Tue, 13 Nov 2012 21:41:32 +0000 (15:41 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 23:14:59 +0000 (15:14 -0800)
Return PTR_ERR(-ENOMEM) if dmm_txn_init cannot allocate a
refill engine.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/omapdrm/omap_dmm_tiler.c

index 4d138df369b305c065a03803c86fa1dfbe6a4902..5c809c0568597e339cbf31dfc815e97394c223f5 100644 (file)
@@ -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 = {