mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 11:36:53 +07:00
of: gpio unittest kfree() wrong object
kernel test robot reported "WARNING: held lock freed!" triggered by
unittest_gpio_remove(). unittest_gpio_remove() was unexpectedly
called due to an error in overlay tracking. The remove had not
been tested because the gpio overlay removal tests have not been
implemented.
kfree() gdev instead of pdev.
Fixes: f4056e705b
("of: unittest: add overlay gpio test to catch gpio hog problem")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
978e9c3ba0
commit
fb227f597d
@ -1571,7 +1571,7 @@ static int unittest_gpio_remove(struct platform_device *pdev)
|
||||
gpiochip_remove(&gdev->chip);
|
||||
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
kfree(pdev);
|
||||
kfree(gdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user