]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/v4l2-int-device.c
V4L/DVB (6580): Set slave's master before master's attach call.
[linux-2.6-omap-h63xx.git] / drivers / media / video / v4l2-int-device.c
index 8b4ef530a3a8a60c58013e5a865efaac9776d578..a545dcaf857f72ee646405aeffff9ced4a3fedd8 100644 (file)
@@ -57,12 +57,12 @@ static void v4l2_int_device_try_attach_all(void)
                        if (!try_module_get(m->module))
                                continue;
 
-                       if (m->u.master->attach(m, s)) {
+                       s->u.slave->master = m;
+                       if (m->u.master->attach(s)) {
+                               s->u.slave->master = NULL;
                                module_put(m->module);
                                continue;
                        }
-
-                       s->u.slave->master = m;
                }
        }
 }