[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d120d5000609261023o20c29171kcba4903c9a35fffb@mail.gmail.com>
Date: Tue, 26 Sep 2006 13:23:34 -0400
From: "Dmitry Torokhov" <dmitry.torokhov@...il.com>
To: "Greg KH" <greg@...ah.com>
Cc: linux-kernel@...r.kernel.org, "Andrew Morton" <akpm@...l.org>,
"Cornelia Huck" <cornelia.huck@...ibm.com>,
"Greg Kroah-Hartman" <gregkh@...e.de>
Subject: Re: [PATCH 41/47] drivers/base: check errors
On 9/26/06, Greg KH <greg@...ah.com> wrote:
> From: Andrew Morton <akpm@...l.org>
>
> Add lots of return-value checking.
>
> + if (error)
> + goto out;
> + error = sysfs_create_link(&bus->devices.kobj,
> + &dev->kobj, dev->bus_id);
> + if (error)
> + goto out;
> + error = sysfs_create_link(&dev->kobj,
> + &dev->bus->subsys.kset.kobj, "subsystem");
> + if (error)
> + goto out;
> + error = sysfs_create_link(&dev->kobj,
> + &dev->bus->subsys.kset.kobj, "bus");
> }
> +out:
> return error;
What about removing the links that were created if one of these calls fails?
--
Dmitry
-
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