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

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

Merge "qcom: wdog: fix static analyzer reported issue in watchdog core"

parents 1baf48e1 906421ed
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ static struct qcom_irq_info *search(struct qcom_irq_info *key,
				    struct qcom_irq_info *base,
				    size_t num, compare_t cmp)
{
	struct qcom_irq_info *pivot;
	struct qcom_irq_info *pivot = NULL;
	int result;

	while (num > 0) {
@@ -101,6 +101,10 @@ static struct qcom_irq_info *search(struct qcom_irq_info *key,
	}

out:
	if (pivot)
		pr_debug("*pivot:%u key:%u\n",
			pivot->total_count, key->total_count);

	return pivot;
}

@@ -184,9 +188,6 @@ static void compute_irq_stat(struct work_struct *work)
		pos = search(&key, wdog_dd->irq_counts,
			     arr_size, cmp_irq_info_fn);

		pr_debug("*pos:%u key:%u\n",
			  pos->total_count, key.total_count);

		if (pos && (pos->total_count >= key.total_count)) {
			if (pos < start)
				pos++;