[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <82e4877d0704010646lf221d3i1880f9e8d76c1a5f@mail.gmail.com>
Date: Sun, 1 Apr 2007 09:46:10 -0400
From: "Parag Warudkar" <parag.warudkar@...il.com>
To: xiyou.wangcong@...il.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [-mm3 PATCH] (Retry) Check the return value of kobject_add and etc.
On 4/1/07, Parag Warudkar <parag.warudkar@...il.com> wrote:
> >- kobject_add(&p->kobj);
> >+ if (kobject_add(&p->kobj)) {
> >+ kfree(p);
> >+ return;
>
> Please add a printk warning before the return statement to log a
> proper warning stating what happened, which file and line etc. That
> way people can know why something did not work as expected and
> hopefully do something about it.
Never mind - kobject_add() is already verbose enough when it fails.
Parag
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists