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

Commit be8a00f7 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mhi_dev: Avoid re-alloc of netdev interface"

parents 1dc7d01b 943014c3
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -638,6 +638,12 @@ int mhi_dev_net_interface_init(void)
	int index = 0;
	struct mhi_dev_net_client *mhi_net_client = NULL;

	if (mhi_net_ctxt.client_handle) {
		mhi_dev_net_log(MHI_INFO,
			"MHI Netdev interface already initialized\n");
		return ret_val;
	}

	mhi_net_client = kzalloc(sizeof(struct mhi_dev_net_client), GFP_KERNEL);
	if (!mhi_net_client)
		return -ENOMEM;