usbnet:Solve the CFI warning message
authora17671 <a17671@motorola.com>
Wed, 26 Dec 2018 08:13:03 +0000 (16:13 +0800)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:52 +0000 (20:23 +0300)
After CFI feature integrated into the Android Kernel
Motorola USBLAN driver will generate warning/panic
Due to the mismatch of the return type

Change-Id: Ia9d1d78a03c542426d213fdb69274eca817e2ae2
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1287119
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/usb/gadget/function/f_usbnet.c

index 5c1be20fc6185bd7f83be82b7e84635dea879bc8..7c6f0cb120d84493179e807684e4338882fdd28e 100644 (file)
@@ -341,7 +341,7 @@ struct usb_request *usb_get_xmit_request(int stop_flag, struct net_device *dev)
        return req;
 }
 
-static int usb_ether_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t usb_ether_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct usbnet_context *context = netdev_priv(dev);
        struct usb_request *req;