Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c1d96b7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mhi_rmnet: clean channel resources only if allocated"

parents 2be766eb 6e77db96
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -985,13 +985,16 @@ static void rmnet_mhi_cb(struct mhi_cb_info *cb_info)
		if (cb_info->chan == rmnet_mhi_ptr->rx_channel) {
			rmnet_log(rmnet_mhi_ptr, MSG_INFO,
				  "Receive MHI_DISABLE notification for rx path\n");
			if (rmnet_mhi_ptr->dev)
				rmnet_mhi_disable(rmnet_mhi_ptr);
		} else {
			rmnet_log(rmnet_mhi_ptr, MSG_INFO,
				  "Receive MHI_DISABLE notification for tx path\n");
			rmnet_mhi_ptr->tx_enabled = 0;
			rmnet_mhi_internal_clean_unmap_buffers
				(rmnet_mhi_ptr->dev, &rmnet_mhi_ptr->tx_buffers,
			if (rmnet_mhi_ptr->dev)
				rmnet_mhi_internal_clean_unmap_buffers(
						rmnet_mhi_ptr->dev,
						&rmnet_mhi_ptr->tx_buffers,
						DMA_TO_DEVICE);
		}