static int hdm_enqueue(struct most_interface *iface, int channel,
                       struct mbo *mbo)
 {
-       struct most_dev *mdev;
+       struct most_dev *mdev = to_mdev(iface);
        struct most_channel_config *conf;
        int retval = 0;
        struct urb *urb;
        if (iface->num_channels <= channel || channel < 0)
                return -ECHRNG;
 
-       mdev = to_mdev(iface);
        conf = &mdev->conf[channel];
 
        mutex_lock(&mdev->io_mutex);
                                                   unsigned char,
                                                   unsigned char *))
 {
-       struct most_dev *mdev;
+       struct most_dev *mdev = to_mdev(iface);
 
-       mdev = to_mdev(iface);
        mdev->on_netinfo = on_netinfo;
        if (!on_netinfo)
                return;