Commit fb227f59 authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

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: f4056e70 ("of: unittest: add overlay gpio test to catch gpio hog problem")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 978e9c3b
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment