]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/usb/gadget/function/f_ncm.c
Merge tag 'usb-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[thirdparty/linux.git] / drivers / usb / gadget / function / f_ncm.c
index 28f4e6552e84592566d261ec3174773650c5d444..0acc32ed99609f8166877bd221087211e90b119d 100644 (file)
@@ -878,7 +878,7 @@ static int ncm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
                if (alt > 1)
                        goto fail;
 
-               if (ncm->port.in_ep->enabled) {
+               if (ncm->netdev) {
                        DBG(cdev, "reset ncm\n");
                        ncm->netdev = NULL;
                        gether_disconnect(&ncm->port);
@@ -1367,7 +1367,7 @@ static void ncm_disable(struct usb_function *f)
 
        DBG(cdev, "ncm deactivated\n");
 
-       if (ncm->port.in_ep->enabled) {
+       if (ncm->netdev) {
                ncm->netdev = NULL;
                gether_disconnect(&ncm->port);
        }