mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
drm/etnaviv: fix error code in event_alloc()
There are two "ret" variables declared in this function so setting
"ret = -EBUSY;" sets the wrong one. The function ends up returning an
uninitialized variable.
Fixes: f098f9b804 ("drm/etnaviv: move runtime PM handling to events")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
9ec2afde83
commit
88c31d2dd1
|
|
@ -1158,18 +1158,18 @@ static int event_alloc(struct etnaviv_gpu *gpu, unsigned nr_events,
|
|||
int ret;
|
||||
|
||||
for (i = 0; i < nr_events; i++) {
|
||||
unsigned long ret;
|
||||
unsigned long remaining;
|
||||
|
||||
ret = wait_for_completion_timeout(&gpu->event_free, timeout);
|
||||
remaining = wait_for_completion_timeout(&gpu->event_free, timeout);
|
||||
|
||||
if (!ret) {
|
||||
if (!remaining) {
|
||||
dev_err(gpu->dev, "wait_for_completion_timeout failed");
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
acquired++;
|
||||
timeout = ret;
|
||||
timeout = remaining;
|
||||
}
|
||||
|
||||
spin_lock(&gpu->event_spinlock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user