diff options
author | Wolfram Sang <wsa@kernel.org> | 2022-09-27 22:33:37 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-09-27 22:33:37 +0300 |
commit | 85f17d677f6c40069287617630f202eb20fcfe36 (patch) | |
tree | a0a7de12ddf19068b14124d7a64d79cf697e0710 /drivers/gpio/gpio-mockup.c | |
parent | 2dec3a7a7beb23ec11b23986e0e331913d621ff1 (diff) | |
parent | f76349cf41451c5c42a99f18a9163377e4b364ff (diff) | |
download | linux-85f17d677f6c40069287617630f202eb20fcfe36.tar.xz |
Merge branch 'master' into i2c/for-mergewindow
Diffstat (limited to 'drivers/gpio/gpio-mockup.c')
-rw-r--r-- | drivers/gpio/gpio-mockup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c index a2e505a7545c..523dfd17dd92 100644 --- a/drivers/gpio/gpio-mockup.c +++ b/drivers/gpio/gpio-mockup.c @@ -533,8 +533,10 @@ static int __init gpio_mockup_register_chip(int idx) } fwnode = fwnode_create_software_node(properties, NULL); - if (IS_ERR(fwnode)) + if (IS_ERR(fwnode)) { + kfree_strarray(line_names, ngpio); return PTR_ERR(fwnode); + } pdevinfo.name = "gpio-mockup"; pdevinfo.id = idx; @@ -597,9 +599,9 @@ static int __init gpio_mockup_init(void) static void __exit gpio_mockup_exit(void) { + gpio_mockup_unregister_pdevs(); debugfs_remove_recursive(gpio_mockup_dbg_dir); platform_driver_unregister(&gpio_mockup_driver); - gpio_mockup_unregister_pdevs(); } module_init(gpio_mockup_init); |