Commit 56f4a9f7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Matthew Garrett

sony-laptop: fix a couple signedness bugs

This needs to be signed to handle negative error codes.
Remove a redundant check, read_limits is always called with a valid
handle.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMattia Dongili <malattia@linux.it>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent c7a29183
...@@ -2139,7 +2139,7 @@ static ssize_t sony_nc_thermal_mode_show(struct device *dev, ...@@ -2139,7 +2139,7 @@ static ssize_t sony_nc_thermal_mode_show(struct device *dev,
struct device_attribute *attr, char *buffer) struct device_attribute *attr, char *buffer)
{ {
ssize_t count = 0; ssize_t count = 0;
unsigned int mode = sony_nc_thermal_mode_get(); int mode = sony_nc_thermal_mode_get();
if (mode < 0) if (mode < 0)
return mode; return mode;
...@@ -2507,8 +2507,6 @@ static void sony_nc_backlight_ng_read_limits(int handle, ...@@ -2507,8 +2507,6 @@ static void sony_nc_backlight_ng_read_limits(int handle,
props->maxlvl = 0xff; props->maxlvl = 0xff;
offset = sony_find_snc_handle(handle); offset = sony_find_snc_handle(handle);
if (offset < 0)
return;
/* try to read the boundaries from ACPI tables, if we fail the above /* try to read the boundaries from ACPI tables, if we fail the above
* defaults should be reasonable * defaults should be reasonable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment