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

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

 



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

Signed-off-by: Bjorn Helgaas <[email protected]>

Index: work-mm2/drivers/char/sonypi.c
===================================================================
--- work-mm2.orig/drivers/char/sonypi.c	2006-07-17 16:50:45.000000000 -0600
+++ work-mm2/drivers/char/sonypi.c	2006-07-19 16:40:34.000000000 -0600
@@ -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;
-
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