Unverified Commit 7bf2958a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11778 [sync] PR-11729: scsi: qedi: Fix crash while reading debugfs attribute

parents c95f7d95 a658dab4
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -120,15 +120,11 @@ static ssize_t
qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
				 size_t count, loff_t *ppos)
{
	size_t cnt = 0;

	if (*ppos)
		return 0;
	char buf[64];
	int len;

	cnt = sprintf(buffer, "do_not_recover=%d\n", qedi_do_not_recover);
	cnt = min_t(int, count, cnt - *ppos);
	*ppos += cnt;
	return cnt;
	len = sprintf(buf, "do_not_recover=%d\n", qedi_do_not_recover);
	return simple_read_from_buffer(buffer, count, ppos, buf, len);
}

static int