Skip to contentSkip to conversation

sonypi: Don't print driver version until we actually find a device

PATCH New Bjorn Helgaas 1 participant 1 message Jul 25, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sonypi: Don't print driver version until we actually find a device

If we don't find any devices, we shouldn't print anything.

drivers/char/sonypi.c +3 -3
Index: work-mm2/drivers/char/sonypi.c
===================================================================
@@ -1528,13 +1528,13 @@
 {
 	int error;
 
+	if (!dmi_check_system(sonypi_dmi_table))
+		return -ENODEV;
+
 	printk(KERN_INFO
 		"sonypi: Sony Programmable I/O Controller Driver v%s.\n",
 		SONYPI_DRIVER_VERSION);
 
-	if (!dmi_check_system(sonypi_dmi_table))
-		return -ENODEV;
-
 	error = platform_driver_register(&sonypi_driver);
 	if (error)
 		return error;