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

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

Merge "msm: ipa: Ignore empty ipa config file"

parents 4355e9a4 50ddfe2f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <asm/cacheflush.h>
#include <linux/soc/qcom/smem_state.h>
#include <linux/of_irq.h>
#include <linux/ctype.h>

#ifdef CONFIG_ARM64

@@ -5906,6 +5907,7 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
	unsigned long missing;

	char dbg_buff[32] = { 0 };
	int i = 0;

	if (count >= sizeof(dbg_buff))
		return -EFAULT;
@@ -5926,6 +5928,17 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
	if (ipa3_is_ready())
		return count;

	/*Ignore empty ipa_config file*/
	for (i = 0 ; i < count ; ++i) {
		if (!isspace(dbg_buff[i]))
			break;
	}

	if (i == count) {
		IPADBG("Empty ipa_config file\n");
		return count;
	}

	/* Check MHI configuration on MDM devices */
	if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_MDM) {