OSDN Git Service

drm/etnaviv: fix some off by one bugs
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Jul 2018 15:00:18 +0000 (18:00 +0300)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 7 Jan 2019 15:07:39 +0000 (16:07 +0100)
commitf5fd9fd4000984f19db689282054953981a50534
tree567e4fe2b9233848cdf221109e8752133825c7a2
parentbfeffd155283772bbe78c6a05dec7c0128ee500c
drm/etnaviv: fix some off by one bugs

The ->nr_signal is the supposed to be the number of elements in the
->signal array.  There was one place where it was 5 but it was supposed
to be 4.  That looks like a copy and paste bug.  There were also two
checks that were off by one.

Fixes: 9e2c2e273012 ("drm/etnaviv: add infrastructure to query perf counter")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_perfmon.c