dmaengine: idxd: off by one in cleanup code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Dec 2020 08:29:46 +0000 (11:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:18:26 +0000 (20:18 +0100)
commit6e3c67976eda30959833d852bc13c7d0a342cfa9
tree11914a49d8ae25a5fedd9cf4d1eb9cd96ed2980f
parent8b109f4cd1dc2224f900702483be81d61beab864
dmaengine: idxd: off by one in cleanup code

commit ff58f7dd0c1352a01de3a40327895bd51e03de3a upstream.

The clean up is off by one so this will start at "i" and it should start
with "i - 1" and then it doesn't unregister the zeroeth elements in the
array.

Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/X9nFeojulsNqUSnG@mwanda
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/idxd/sysfs.c