The dereference to 'instance' in the debug code should be moved
below the NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        struct usbatm_control *ctrl = UDSL_SKB(skb);
        int err;
 
-       vdbg(&instance->usb_intf->dev, "%s called (skb 0x%p, len %u)", __func__,
-            skb, skb->len);
-
        /* racy disconnection check - fine */
        if (!instance || instance->disconnected) {
 #ifdef DEBUG
                goto fail;
        }
 
+       vdbg(&instance->usb_intf->dev, "%s called (skb 0x%p, len %u)", __func__,
+            skb, skb->len);
+
        if (vcc->qos.aal != ATM_AAL5) {
                atm_rldbg(instance, "%s: unsupported ATM type %d!\n", __func__, vcc->qos.aal);
                err = -EINVAL;