diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-02-08 20:09:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-09 12:56:37 +0300 |
commit | ef0fec22146ba874a1a64d4dd0303183e26a5b6f (patch) | |
tree | 76c4d73970f48ca29f4140443b8ff089c2ce889c /drivers/bus/fsl-mc/dpmcp.c | |
parent | 609cf09c56802f7997497b1fdc89209db52d4449 (diff) | |
download | linux-ef0fec22146ba874a1a64d4dd0303183e26a5b6f.tar.xz |
bus: fsl-mc: Fix test for end of loop
The "desc" pointer can't possibly be NULL here. If we can't find the
correct "desc" then tt points to the last element of the
fsl_mc_accepted_cmds[] array. Fix this by testing if
"i == FSL_MC_NUM_ACCEPTED_CMDS" instead.
Fixes: 2cf1e703f066 ("bus: fsl-mc: add fsl-mc userspace support")
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210208170949.3070898-2-ciorneiioana@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bus/fsl-mc/dpmcp.c')
0 files changed, 0 insertions, 0 deletions