Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[pandora-kernel.git] / net / caif / caif_dev.c
index 7f9ac07..47fc8f3 100644 (file)
@@ -212,8 +212,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
        enum cfcnfg_phy_preference pref;
        enum cfcnfg_phy_type phy_type;
        struct cfcnfg *cfg;
-       struct caif_device_entry_list *caifdevs =
-           caif_device_list(dev_net(dev));
+       struct caif_device_entry_list *caifdevs;
 
        if (dev->type != ARPHRD_CAIF)
                return 0;
@@ -222,6 +221,8 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
        if (cfg == NULL)
                return 0;
 
+       caifdevs = caif_device_list(dev_net(dev));
+
        switch (what) {
        case NETDEV_REGISTER:
                caifd = caif_device_alloc(dev);