linux/drivers/bus/fsl-mc
Dan Carpenter ef0fec2214 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: 2cf1e703f0 ("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>
2021-02-09 10:56:37 +01:00
..
dpbp.c bus: fsl-mc: remove duplicated include files 2018-12-06 15:53:20 +01:00
dpcon.c bus: fsl-mc: remove duplicated include files 2018-12-06 15:53:20 +01:00
dpmcp.c bus: fsl-mc: change mc_command in fsl_mc_command 2018-03-23 15:52:48 +01:00
dprc-driver.c bus: fsl-mc: add autorescan sysfs 2021-01-27 15:13:53 +01:00
dprc.c bus: fsl-mc: added missing fields to dprc_rsp_get_obj_region structure 2020-12-09 19:50:53 +01:00
fsl-mc-allocator.c bus: fsl-mc: fix error return code in fsl_mc_object_allocate() 2020-12-09 19:51:06 +01:00
fsl-mc-bus.c bus: fsl-mc: add autorescan sysfs 2021-01-27 15:13:53 +01:00
fsl-mc-msi.c bus: fsl-mc: Add ACPI support for fsl-mc 2020-07-28 15:51:32 +01:00
fsl-mc-private.h bus: fsl-mc: add autorescan sysfs 2021-01-27 15:13:53 +01:00
fsl-mc-uapi.c bus: fsl-mc: Fix test for end of loop 2021-02-09 10:56:37 +01:00
Kconfig bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
Makefile bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
mc-io.c bus/fsl_mc: Do not rely on caller to provide non NULL mc_io 2020-10-02 16:05:01 +02:00
mc-sys.c bus: fsl-mc: export mc_cmd_hdr_read_cmdid() to the fsl-mc bus 2021-01-27 15:13:52 +01:00