Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257612 > unrolled thread
| Started by | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| First post | 2015-10-28 03:50 +0100 |
| Last post | 2015-10-28 03:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] acpi:correctly check failed allocation "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 03:50 +0100
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2015-10-28 03:50 +0100 |
| Subject | Re: [PATCH] acpi:correctly check failed allocation |
| Message-ID | <qooYi-54u-15@gated-at.bofh.it> |
On Thursday, October 15, 2015 12:19:30 PM Insu Yun wrote:
> Since kobject_create_and_add can be failed in memory pressure,
> return value need to be checked and return ENOMEM.
>
> Signed-off-by: Insu Yun <wuninsu@gmail.com>
> ---
> drivers/acpi/sysfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> index 40a4265..e712a7b 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -878,6 +878,8 @@ int __init acpi_sysfs_init(void)
> return result;
>
> hotplug_kobj = kobject_create_and_add("hotplug", acpi_kobj);
> + if (!hotplug_kobj)
> + return -ENOMEM;
> result = sysfs_create_file(hotplug_kobj, &force_remove_attr.attr);
> if (result)
> return result;
>
Applied (with whitespace fixed), thanks!
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web