Re: [KJ][PATCH] Correct misc_register return code handling in several drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ar Llu, 2006-10-23 am 13:19 -0400, ysgrifennodd Neil Horman:
> +	for_each_online_node(node) {
> +		if(timers[node] != NULL)
> +			kfree(timers[node]);
> +	}

The if test appears to be redundant as kfree(NULL) is a valid no-op.

> +	if (misc_register(&hp_sdc_rtc_dev) != 0)
> +		printk(KERN_INFO "Could not register misc. dev for sdc\n");

Many users will misconstrue this has a hard disk name - is there a
better name to use.

>  	if (ret)
>  		printk(KERN_ERR "tun: Can't register misc device %d\n", TUN_MINOR);

These all really show that we should pass the name into the misc
register and do the printk there to cut down on random name variants and
kernel size. Separate problem, just noting it in case someone feels
inspired 8)

Alan

-
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]
  Powered by Linux