* Re: [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails
@ 2020-07-23 6:28 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2020-07-23 6:28 UTC (permalink / raw)
To: Li Heng, linux-efi
Cc: linux-kernel, kernel-janitors, Ard Biesheuvel, Rui Xiang
> destroy_workqueue() should be called to destroy efi_rts_wq
> when efisubsys_init() init resources fails.
* Can such exception handling depend on the data structure member “efi.runtime_supported_mask”?
* An imperative wording would be preferred for the change description
(besides another bit of fine-tuning), wouldn't it?
* Will the tag “Fixes” become helpful for the commit message?
…
> +++ b/drivers/firmware/efi/efi.c
> @@ -379,6 +379,7 @@ static int __init efisubsys_init(void)
> efi_kobj = kobject_create_and_add("efi", firmware_kobj);
> if (!efi_kobj) {
> pr_err("efi: Firmware registration failed.\n");
> + destroy_workqueue(efi_rts_wq);
> return -ENOMEM;
> }
How do you think about to use the following statements instead
in the if branch?
- return -ENOMEM;
+ error = -ENOMEM;
+ goto destroy_workqueue;
Regards,
Markus
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-23 6:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 6:28 [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).