Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310157
b: refs/heads/master
c: bab7084
h: refs/heads/master
i:
  310155: 45d8ef1
v: v3
  • Loading branch information
Mattia Dongili authored and Matthew Garrett committed May 31, 2012
1 parent 4f48f62 commit 816f39b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49f000adcad2d47f22ae97eb78fb2ef8081cd08f
refs/heads/master: bab7084c745bf4d75b760728387f375fd34dc683
8 changes: 4 additions & 4 deletions trunk/drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ static int sony_find_snc_handle(int handle)
int i;

/* not initialized yet, return early */
if (!handles)
return -1;
if (!handles || !handle)
return -EINVAL;

for (i = 0; i < 0x10; i++) {
if (handles->cap[i] == handle) {
Expand All @@ -881,7 +881,7 @@ static int sony_find_snc_handle(int handle)
}
}
dprintk("handle 0x%.4x not found\n", handle);
return -1;
return -EINVAL;
}

static int sony_call_snc_handle(int handle, int argument, int *result)
Expand All @@ -890,7 +890,7 @@ static int sony_call_snc_handle(int handle, int argument, int *result)
int offset = sony_find_snc_handle(handle);

if (offset < 0)
return -1;
return offset;

arg = offset | argument;
ret = sony_nc_int_call(sony_nc_acpi_handle, "SN07", &arg, result);
Expand Down

0 comments on commit 816f39b

Please sign in to comment.