forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/can/usb/ems_usb.c
....@@ -1,20 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * CAN driver for EMS Dr. Thomas Wuensche CPC-USB/ARM7
34 *
45 * Copyright (C) 2004-2009 EMS Dr. Thomas Wuensche
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published
8
- * by the Free Software Foundation; version 2 of the License.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along
16
- * with this program; if not, write to the Free Software Foundation, Inc.,
17
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
186 */
197 #include <linux/signal.h>
208 #include <linux/slab.h>
....@@ -206,7 +194,7 @@
206194 __le32 ts_sec; /* timestamp in seconds */
207195 __le32 ts_nsec; /* timestamp in nano seconds */
208196
209
- union {
197
+ union __packed {
210198 u8 generic[64];
211199 struct cpc_can_msg can_msg;
212200 struct cpc_can_params can_params;
....@@ -835,7 +823,6 @@
835823
836824 usb_unanchor_urb(urb);
837825 usb_free_coherent(dev->udev, size, buf, urb->transfer_dma);
838
- dev_kfree_skb(skb);
839826
840827 atomic_dec(&dev->active_tx_urbs);
841828