From 816f39b5e8a9305b894ee7c1841094da16f358ad Mon Sep 17 00:00:00 2001 From: Mattia Dongili Date: Sat, 19 May 2012 22:35:52 +0900 Subject: [PATCH] --- yaml --- r: 310157 b: refs/heads/master c: bab7084c745bf4d75b760728387f375fd34dc683 h: refs/heads/master i: 310155: 45d8ef1679491dda28d2b4321f645b2a31ebe13a v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/sony-laptop.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 4f7afc04b5e5..606ae98521d0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 49f000adcad2d47f22ae97eb78fb2ef8081cd08f +refs/heads/master: bab7084c745bf4d75b760728387f375fd34dc683 diff --git a/trunk/drivers/platform/x86/sony-laptop.c b/trunk/drivers/platform/x86/sony-laptop.c index c3f54ad8125c..2b72e476dfff 100644 --- a/trunk/drivers/platform/x86/sony-laptop.c +++ b/trunk/drivers/platform/x86/sony-laptop.c @@ -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) { @@ -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) @@ -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);