[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1184149081.6005.606.camel@localhost.localdomain>
Date: Wed, 11 Jul 2007 20:18:01 +1000
From: Rusty Russell <rusty@...tcorp.com.au>
To: Fernando Luis Vázquez Cao
<fernando@....ntt.co.jp>
Cc: dedekind@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] try_module_get usage
On Wed, 2007-07-11 at 16:55 +0900, Fernando Luis Vázquez Cao wrote:
> I keep seeing uses of try_module_get(THIS_MODULE) which seem to mimic
> the behavior of the former MOD_INC_USE_COUNT. The UBI driver is one
> example:
>
> int ubi_get_device_info(int ubi_num, struct ubi_device_info *di)
> {
> const struct ubi_device *ubi;
>
> if (!try_module_get(THIS_MODULE))
> return -ENODEV;
Yes, this code is wrong.
Thanks,
Rusty.
-
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