* [PATCH 07/24] kernel: return actual error on param_sysfs_init
@ 2014-06-17 14:29 Jeff Liu
2014-06-17 19:25 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Liu @ 2014-06-17 14:29 UTC (permalink / raw)
To: Andrew Morton; +Cc: Christoph Lameter, LKML
From: Jie Liu <jeff.liu@oracle.com>
Return the actual error code if kset_create_and_add() failed
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
kernel/params.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/params.c b/kernel/params.c
index 1e52ca2..a110987 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -928,10 +928,9 @@ struct kobj_type module_ktype = {
static int __init param_sysfs_init(void)
{
module_kset = kset_create_and_add("module", &module_uevent_ops, NULL);
- if (!module_kset) {
- printk(KERN_WARNING "%s (%d): error creating kset\n",
- __FILE__, __LINE__);
- return -ENOMEM;
+ if (IS_ERR(module_kset)) {
+ pr_warn("%s (%d): error creating kset\n", __FILE__, __LINE__);
+ return PTR_ERR(module_kset);
}
module_sysfs_initialized = 1;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 07/24] kernel: return actual error on param_sysfs_init
2014-06-17 14:29 [PATCH 07/24] kernel: return actual error on param_sysfs_init Jeff Liu
@ 2014-06-17 19:25 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-06-17 19:25 UTC (permalink / raw)
To: Jeff Liu; +Cc: Andrew Morton, Christoph Lameter, LKML
On Tue, Jun 17, 2014 at 10:29:07PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> Return the actual error code if kset_create_and_add() failed
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Christoph Lameter <cl@linux-foundation.org>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
> ---
> kernel/params.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Andrew and Christoph, please do not take this patch.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-17 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:29 [PATCH 07/24] kernel: return actual error on param_sysfs_init Jeff Liu
2014-06-17 19:25 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox