Re: [PATCH v2] s390: raw3270: Handle allocation failures
Markus Elfring <[email protected]>
| Newsgroups | org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
> Check the return values of kzalloc_obj() and kzalloc() before using the > allocated memory. Free the allocated resources on subsequent initialization > failures to avoid leaking memory. * How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34 * Please avoid duplicate source code also for an improved implementation of the function “raw3270_setup_console”. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.2#n526 https://elixir.bootlin.com/linux/v7.2/source/drivers/s390/char/raw3270.c#L802-L839 * How do you think about to increase the application of scope-based resource management? Regards, Markus