Re: [PATCH V2 08/15] coresight: tmc: getting the right read_count on tmc_open()
From: Suzuki K Poulose
Date: Tue Apr 19 2016 - 09:07:18 EST
On 12/04/16 18:54, Mathieu Poirier wrote:
In function tmc_open(), if tmc_read_prepare() fails variable
drvdata->read_count is not decremented, causing unwanted
access to drvdata->buf and very likely, a crash dump.
By moving the incrementation to a place where we know things
are stable this kind of situation is avoided.
Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>