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

Commit fb8a79c5 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 a3a4fb05 d56fbde3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <asm/cacheflush.h>
#include <linux/soc/qcom/smem_state.h>
#include <linux/of_irq.h>
#include <linux/ctype.h>

#ifdef CONFIG_ARM64

@@ -5968,6 +5969,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;
@@ -5988,6 +5990,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) {