diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c b/drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c index c8ef3a0e7bc5..e011fdcae27a 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved. */ #include @@ -1515,13 +1515,13 @@ static void ipa3_q6_clnt_svc_arrive(struct work_struct *work) IPAWANERR( "ipa3_qmi_init_modem_send_sync_msg failed due to SSR!\n"); /* Cleanup when ipa3_wwan_remove is called */ + mutex_lock(&ipa3_qmi_lock); if (ipa_q6_clnt != NULL) { - mutex_lock(&ipa3_qmi_lock); qmi_handle_release(ipa_q6_clnt); vfree(ipa_q6_clnt); ipa_q6_clnt = NULL; - mutex_unlock(&ipa3_qmi_lock); } + mutex_unlock(&ipa3_qmi_lock); IPAWANERR("Exit from service arrive fun\n"); return; } diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c index 4e447e453acb..de5d8d7ac681 100644 --- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c @@ -2144,11 +2144,12 @@ static int ipa3_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) if (mtu_v4_set && mtu_v6_set) iptype = IPA_IP_MAX; - rc = rmnet_ipa_send_set_mtu_notification( - ext_ioctl_data.u.mtu_params.if_name, - mux_channel[rmnet_index].mtu_v4, - mux_channel[rmnet_index].mtu_v6, - iptype); + if (mtu_v4_set || mtu_v6_set) + rc = rmnet_ipa_send_set_mtu_notification( + ext_ioctl_data.u.mtu_params.if_name, + mux_channel[rmnet_index].mtu_v4, + mux_channel[rmnet_index].mtu_v6, + iptype); break; default: