> +int cpu_add_sysdev_attr(struct sysdev_attribute *attr)
> +{
> + int cpu;
> +
> + mutex_lock(&cpu_mutex);
> +
> + for_each_possible_cpu(cpu) {
> + sysdev_create_file(get_cpu_sysdev(cpu), attr);
> + }
> +
> + mutex_unlock(&cpu_mutex);
> + return 0;
> +}
You probably should check for errors on sysdev_create_file, clean up and
return an error number instead of always 0.
This is true for all the new functions here.
-
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]