All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] sony-laptop: fix a couple signedness bugs
@ 2012-06-07  8:22 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2012-06-07  8:22 UTC (permalink / raw)
  To: Mattia Dongili; +Cc: Matthew Garrett, platform-driver-x86, kernel-janitors

These need to be signed to handle negative error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 210d4ae..0a2f026 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -2113,7 +2113,7 @@ static ssize_t sony_nc_thermal_mode_show(struct device *dev,
 		struct device_attribute *attr, char *buffer)
 {
 	ssize_t count = 0;
-	unsigned int mode = sony_nc_thermal_mode_get();
+	int mode = sony_nc_thermal_mode_get();
 
 	if (mode < 0)
 		return mode;
@@ -2480,7 +2480,7 @@ static void sony_nc_backlight_ng_read_limits(int handle,
 	props->maxlvl = 0xff;
 
 	offset = sony_find_snc_handle(handle);
-	if (offset < 0)
+	if ((int)offset < 0)
 		return;
 
 	/* try to read the boundaries from ACPI tables, if we fail the above

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-06-07 21:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07  8:22 [patch] sony-laptop: fix a couple signedness bugs Dan Carpenter
2012-06-07  8:22 ` Dan Carpenter
2012-06-07  9:47 ` walter harms
2012-06-07  9:47   ` walter harms
2012-06-07  9:59   ` Dan Carpenter
2012-06-07  9:59     ` Dan Carpenter
2012-06-07 10:17     ` walter harms
2012-06-07 10:17       ` walter harms
2012-06-07 21:42       ` Mattia Dongili
2012-06-07 21:42         ` Mattia Dongili

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.