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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]