[media] media/dvb-core: forward media_create_pad_links() return value
authorMax Kellermann <max@duempel.org>
Fri, 18 Mar 2016 21:31:35 +0000 (18:31 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 7 May 2016 13:56:55 +0000 (10:56 -0300)
Instead of always return -ENOMEM, return the real error that should
come from media_create_pad_link().

Signed-off-by: Max Kellermann <max@duempel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-core/dvbdev.c

index e1684c5..75a3f4b 100644 (file)
@@ -676,13 +676,13 @@ int dvb_create_media_graph(struct dvb_adapter *adap,
                                             demux, 0, MEDIA_LNK_FL_ENABLED,
                                             false);
                if (ret)
-                       return -ENOMEM;
+                       return ret;
        }
        if (demux && ca) {
                ret = media_create_pad_link(demux, 1, ca,
                                            0, MEDIA_LNK_FL_ENABLED);
                if (ret)
-                       return -ENOMEM;
+                       return ret;
        }
 
        /* Create demux links for each ringbuffer/pad */