diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 477b082aa6a8..ac7dc35b1e89 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -3743,10 +3743,12 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id) if (hidpp->quirks & HIDPP_QUIRK_CLASS_G920) { ret = hidpp_ff_init(hidpp, &data); - if (ret) + if (ret) { hid_warn(hidpp->hid_dev, "Unable to initialize force feedback support, errno %d\n", ret); + ret = 0; + } } return ret; diff --git a/drivers/input/misc/ets_bix_mmi/etxxx_fp.c b/drivers/input/misc/ets_bix_mmi/etxxx_fp.c index 1384c113b690..e5caee6a476d 100755 --- a/drivers/input/misc/ets_bix_mmi/etxxx_fp.c +++ b/drivers/input/misc/ets_bix_mmi/etxxx_fp.c @@ -1543,7 +1543,7 @@ egistec_probe_failed: return status; } -int __init egisfp_init(void) +static int __init egisfp_init(void) { int status; INFO_PRINT(" %s : module init \n", __func__); @@ -1556,7 +1556,7 @@ int __init egisfp_init(void) INFO_PRINT(" %s : module init OK ! \n", __func__); return status; } -void __exit egisfp_exit(void) +static void __exit egisfp_exit(void) { INFO_PRINT("module exit \n"); platform_driver_unregister(&egisfp_driver); diff --git a/drivers/input/misc/rbs_fod_mmi/etxxx_fp.c b/drivers/input/misc/rbs_fod_mmi/etxxx_fp.c index b4e4068acd8b..fdee9e03ebc4 100644 --- a/drivers/input/misc/rbs_fod_mmi/etxxx_fp.c +++ b/drivers/input/misc/rbs_fod_mmi/etxxx_fp.c @@ -1473,7 +1473,7 @@ egistec_probe_failed: return status; } -int __init egisfp_init(void) +static int __init egisfp_init(void) { int status; INFO_PRINT(" %s : module init \n", __func__); @@ -1486,7 +1486,7 @@ int __init egisfp_init(void) INFO_PRINT(" %s : module init OK ! \n", __func__); return status; } -void __exit egisfp_exit(void) +static void __exit egisfp_exit(void) { INFO_PRINT("module exit \n"); platform_driver_unregister(&egisfp_driver); diff --git a/drivers/input/misc/rbs_fps_mmi/etxxx_fp.c b/drivers/input/misc/rbs_fps_mmi/etxxx_fp.c index f75ffeedd2e3..9ca505d7575b 100644 --- a/drivers/input/misc/rbs_fps_mmi/etxxx_fp.c +++ b/drivers/input/misc/rbs_fps_mmi/etxxx_fp.c @@ -1389,7 +1389,7 @@ egistec_probe_failed: return status; } -int __init egisfp_init(void) +static int __init egisfp_init(void) { int status; INFO_PRINT(" %s : module init \n", __func__); @@ -1402,7 +1402,7 @@ int __init egisfp_init(void) INFO_PRINT(" %s : module init OK ! \n", __func__); return status; } -void __exit egisfp_exit(void) +static void __exit egisfp_exit(void) { INFO_PRINT("module exit \n"); platform_driver_unregister(&egisfp_driver); diff --git a/drivers/staging/qcacld-3.0/core/dp/htt/htt_h2t.c b/drivers/staging/qcacld-3.0/core/dp/htt/htt_h2t.c index e1bed656e5ec..3038b831a3e5 100644 --- a/drivers/staging/qcacld-3.0/core/dp/htt/htt_h2t.c +++ b/drivers/staging/qcacld-3.0/core/dp/htt/htt_h2t.c @@ -629,7 +629,7 @@ htt_h2t_rx_ring_cfg_msg_hl(struct htt_pdev_t *pdev) pkt = htt_htc_pkt_alloc(pdev); if (!pkt) - return A_ERROR; /* failure */ + return QDF_STATUS_E_FAILURE; /* failure */ /* * show that this is not a tx frame download @@ -645,7 +645,7 @@ htt_h2t_rx_ring_cfg_msg_hl(struct htt_pdev_t *pdev) HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING, 4, true); if (!msg) { htt_htc_pkt_free(pdev, pkt); - return A_ERROR; /* failure */ + return QDF_STATUS_E_FAILURE; /* failure */ } /* * Set the length of the message. diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index da3cb0d29b97..cd481490bcfe 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c @@ -1096,6 +1096,7 @@ static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local, if (sk->sk_state == LLCP_CLOSED) { release_sock(sk); nfc_llcp_sock_put(llcp_sock); + return; } /* Pass the payload upstream */ @@ -1187,6 +1188,7 @@ static void nfc_llcp_recv_disc(struct nfc_llcp_local *local, if (sk->sk_state == LLCP_CLOSED) { release_sock(sk); nfc_llcp_sock_put(llcp_sock); + return; } if (sk->sk_state == LLCP_CONNECTED) { diff --git a/net/tipc/msg.c b/net/tipc/msg.c index ff167decbef1..5ba2c8ec8e11 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c @@ -175,8 +175,20 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf) if (fragid == LAST_FRAGMENT) { TIPC_SKB_CB(head)->validated = false; - if (unlikely(!tipc_msg_validate(&head))) + + /* If the reassembled skb has been freed in + * tipc_msg_validate() because of an invalid truesize, + * then head will point to a newly allocated reassembled + * skb, while *headbuf points to freed reassembled skb. + * In such cases, correct *headbuf for freeing the newly + * allocated reassembled skb later. + */ + if (unlikely(!tipc_msg_validate(&head))) { + if (head != *headbuf) + *headbuf = head; goto err; + } + *buf = head; TIPC_SKB_CB(head)->tail = NULL; *headbuf = NULL; diff --git a/techpack/audio/asoc/codecs/wcd_cpe_services.c b/techpack/audio/asoc/codecs/wcd_cpe_services.c index 96e2bb1945a4..fb6e1de56a21 100644 --- a/techpack/audio/asoc/codecs/wcd_cpe_services.c +++ b/techpack/audio/asoc/codecs/wcd_cpe_services.c @@ -987,7 +987,7 @@ static enum cpe_svc_result broadcast_boot_event( static enum cpe_process_result cpe_boot_initialize(struct cpe_info *t_info, enum cpe_svc_result *cpe_rc) { - enum cpe_process_result rc = CPE_SVC_FAILED; + enum cpe_process_result rc = CPE_PROC_FAILED; struct cpe_svc_notification payload; struct cmi_core_svc_event_system_boot *p = NULL; @@ -1991,7 +1991,7 @@ enum cmi_api_result cmi_send_msg(void *message) GFP_ATOMIC); if (!msg) { CPE_SVC_REL_LOCK(&cpe_d.cpe_api_mutex, "cpe_api"); - return CPE_SVC_NO_MEMORY; + return CMI_API_NO_MEMORY; } if (CMI_HDR_GET_OBM_FLAG(hdr) == CMI_OBM_FLAG_OUT_BAND) @@ -2006,7 +2006,7 @@ enum cmi_api_result cmi_send_msg(void *message) if (!msg->payload) { kfree(msg); CPE_SVC_REL_LOCK(&cpe_d.cpe_api_mutex, "cpe_api"); - return CPE_SVC_NO_MEMORY; + return CMI_API_NO_MEMORY; } msg->address = 0;