.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * CAIF USB handler |
---|
3 | 4 | * Copyright (C) ST-Ericsson AB 2011 |
---|
4 | 5 | * Author: Sjur Brendeland |
---|
5 | | - * License terms: GNU General Public License (GPL) version 2 |
---|
6 | | - * |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ |
---|
.. | .. |
---|
63 | 62 | hpad = (info->hdr_len + CFUSB_PAD_DESCR_SZ) & (CFUSB_ALIGNMENT - 1); |
---|
64 | 63 | |
---|
65 | 64 | if (skb_headroom(skb) < ETH_HLEN + CFUSB_PAD_DESCR_SZ + hpad) { |
---|
66 | | - pr_warn("Headroom to small\n"); |
---|
| 65 | + pr_warn("Headroom too small\n"); |
---|
67 | 66 | kfree_skb(skb); |
---|
68 | 67 | return -EIO; |
---|
69 | 68 | } |
---|
.. | .. |
---|
135 | 134 | struct usb_device *usbdev; |
---|
136 | 135 | int res; |
---|
137 | 136 | |
---|
| 137 | + if (what == NETDEV_UNREGISTER && dev->reg_state >= NETREG_UNREGISTERED) |
---|
| 138 | + return 0; |
---|
| 139 | + |
---|
138 | 140 | /* Check whether we have a NCM device, and find its VID/PID. */ |
---|
139 | 141 | if (!(dev->dev.parent && dev->dev.parent->driver && |
---|
140 | 142 | strcmp(dev->dev.parent->driver->name, "cdc_ncm") == 0)) |
---|