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

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

Merge "mfd: wcd9xxx-slimslave: Return error to caller if buffer timeout happens"

parents 2188e3d6 58ddf789
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -765,6 +765,18 @@ int wcd9xxx_slim_ch_master_status(struct wcd9xxx *wcd9xxx, void *handle,
		pr_err("%s: Get Xfer status rc %x, len %x\n",
		       __func__, rc, *(len));
	}

	if (!rc && *len == 0) {
		/*
		 * If timeout occurred and the length of
		 * buffer returned is 0, then there is a
		 * error on the bus, return error to caller
		 * to avoid queuing more buffers.
		 */
		pr_err("%s: no buffer returned after timeout\n",
			__func__);
		rc = -EIO;
	}
	mutex_unlock(&tx_master->lock);
return rc;
}