Re: [PATCH 3/5]acpi:glue.c Fix warning: variable 'ret' set but not used

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

 



Justin P. Mattock <justinmattock@xxxxxxxxx> wrote:

> +		if (ret) {
> +			printk(KERN_WARNING "dev%d: Failed to get exception\n", ret);
> +		}

That's not a good warning because it's a meaningless string and you're passing
the error number to the dev%d.

Better would perhaps be:

	"dev%d: Failed to create physical_node sysfs link: %d\n"

Note also that you're only checking the result of one sysfs_create_link().
You should probably check both.

Also you're introducing a pair of unnecessary braces as there's only one
statement in the if-body.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux