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

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

Merge "msm: rndis: add function call return value checking"

parents a71f2304 1e7e60ad
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -528,7 +528,13 @@ int rndis_ipa_init(struct ipa_usb_init_params *params)
	RNDIS_IPA_DEBUG("network device was successfully allocated\n");

	rndis_ipa_ctx = netdev_priv(net);
	if (!rndis_ipa_ctx) {
		result = -ENOMEM;
		RNDIS_IPA_ERROR("fail to extract netdev priv\n");
		goto fail_netdev_priv;
	}
	memset(rndis_ipa_ctx, 0, sizeof(*rndis_ipa_ctx));

	rndis_ipa_ctx->net = net;
	rndis_ipa_ctx->tx_filter = false;
	rndis_ipa_ctx->rx_filter = false;
@@ -629,6 +635,7 @@ fail_hdrs_cfg:
fail_create_rm:
	rndis_ipa_debugfs_destroy(rndis_ipa_ctx);
fail_debugfs:
fail_netdev_priv:
	free_netdev(net);
fail_alloc_etherdev:
	return result;
@@ -670,6 +677,7 @@ int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,
{
	struct rndis_ipa_dev *rndis_ipa_ctx = private;
	int next_state;
	int result;

	RNDIS_IPA_LOG_ENTRY();

@@ -699,18 +707,23 @@ int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,
	}
	rndis_ipa_ctx->ipa_to_usb_hdl = ipa_to_usb_hdl;
	rndis_ipa_ctx->usb_to_ipa_hdl = usb_to_ipa_hdl;
	rndis_ipa_ep_registers_cfg(usb_to_ipa_hdl,
	result = rndis_ipa_ep_registers_cfg(usb_to_ipa_hdl,
			ipa_to_usb_hdl,
			max_transfer_byte_size,
			max_packet_number,
			rndis_ipa_ctx->net->mtu,
			rndis_ipa_ctx->deaggregation_enable);
	if (result) {
		RNDIS_IPA_ERROR("fail on ep cfg\n");
		goto fail;
	}
	RNDIS_IPA_DEBUG("end-points configured\n");

	netif_carrier_on(rndis_ipa_ctx->net);
	if (!netif_carrier_ok(rndis_ipa_ctx->net)) {
		RNDIS_IPA_ERROR("netif_carrier_ok error\n");
		return -EBUSY;
		result = -EBUSY;
		goto fail;
	}
	RNDIS_IPA_DEBUG("carrier_on notified\n");

@@ -725,7 +738,8 @@ int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,

	RNDIS_IPA_LOG_EXIT();

	return 0;
fail:
	return result;
}
EXPORT_SYMBOL(rndis_ipa_pipe_connect_notify);