bus: arm-ccn: Fix error handling at event allocation
authorPawel Moll <pawel.moll@arm.com>
Thu, 31 Jul 2014 15:16:37 +0000 (16:16 +0100)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Aug 2014 03:46:57 +0000 (20:46 -0700)
The bitfield allocation function returns error condition
as a negative value, but in two cases its result
was assigned to an unsigned member of the hw_perf_event
structure, thus the error would not be ever detected.

Fixed by using an intermediate, signed variable.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>

No differences found