1
0
Fork 0
remarkable-linux/drivers/staging/fsl-mc/include
Ioana Radulescu 9093d8bc53 staging: fsl-mc/dpio: Fix incorrect comparison
[ Upstream commit 8dabf52ffb ]

For some dpio functions, a cpu id parameter value of -1 is
valid and means "any". But when trying to validate this param
value against an upper limit, in this case num_possible_cpus(),
we risk obtaining the wrong result due to an implicit cast.

Avoid an incorrect check result by explicitly comparing the
cpu id with the "any" value before verifying the upper bound.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-10 13:40:42 +01:00
..
dpaa2-fd.h staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd 2017-04-28 17:51:54 +02:00
dpaa2-global.h bus: fsl-mc: dpio: add global dpaa2 definitions 2017-03-14 11:19:52 +08:00
dpaa2-io.h staging: fsl-mc/dpio: Fix incorrect comparison 2017-12-10 13:40:42 +01:00
dpbp.h staging: fsl-mc: dpbp: drop unused APIs 2017-02-09 13:26:02 +01:00
dpcon.h staging: fsl-mc: bus: add DPCON object APIs 2017-04-28 14:25:17 +02:00
mc.h staging: fsl-mc: make dprc.h header private 2017-06-29 16:38:53 +02:00