mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
dmaengine: idxd: off by one in cleanup code
commitff58f7dd0cupstream. 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:c52ca47823("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8b109f4cd1
commit
6e3c67976e
@@ -379,7 +379,7 @@ int idxd_register_driver(void)
|
||||
return 0;
|
||||
|
||||
drv_fail:
|
||||
for (; i > 0; i--)
|
||||
while (--i >= 0)
|
||||
driver_unregister(&idxd_drvs[i]->drv);
|
||||
return rc;
|
||||
}
|
||||
@@ -1639,7 +1639,7 @@ int idxd_register_bus_type(void)
|
||||
return 0;
|
||||
|
||||
bus_err:
|
||||
for (; i > 0; i--)
|
||||
while (--i >= 0)
|
||||
bus_unregister(idxd_bus_types[i]);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user