diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-01-25 09:12:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-25 17:57:17 -0500 |
commit | ecb5646cb098d9d1961c4b1af7b776c73b7541ac (patch) | |
tree | cddda632fe6e3af9fb7f28cf1fdbb076e8d88b22 /drivers/platform/x86 | |
parent | c723fdab8aa728dc2bf0da6a0de8bb9c3f588d84 (diff) |
intel_scu_ipc: fix signedness bug
busy_loop() returns negative error code, thus change err variable
from u32 to int to properly propagate correct error code.
Also remove unneeded initialization for err and i variables.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/intel_scu_ipc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c index 1752ef006d26..f374c5961b32 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c | |||
@@ -161,7 +161,7 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id) | |||
161 | { | 161 | { |
162 | int i, nc, bytes, d; | 162 | int i, nc, bytes, d; |
163 | u32 offset = 0; | 163 | u32 offset = 0; |
164 | u32 err = 0; | 164 | int err; |
165 | u8 cbuf[IPC_WWBUF_SIZE] = { }; | 165 | u8 cbuf[IPC_WWBUF_SIZE] = { }; |
166 | u32 *wbuf = (u32 *)&cbuf; | 166 | u32 *wbuf = (u32 *)&cbuf; |
167 | 167 | ||
@@ -404,7 +404,7 @@ EXPORT_SYMBOL(intel_scu_ipc_update_register); | |||
404 | */ | 404 | */ |
405 | int intel_scu_ipc_simple_command(int cmd, int sub) | 405 | int intel_scu_ipc_simple_command(int cmd, int sub) |
406 | { | 406 | { |
407 | u32 err = 0; | 407 | int err; |
408 | 408 | ||
409 | mutex_lock(&ipclock); | 409 | mutex_lock(&ipclock); |
410 | if (ipcdev.pdev == NULL) { | 410 | if (ipcdev.pdev == NULL) { |
@@ -434,8 +434,7 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command); | |||
434 | int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen, | 434 | int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen, |
435 | u32 *out, int outlen) | 435 | u32 *out, int outlen) |
436 | { | 436 | { |
437 | u32 err = 0; | 437 | int i, err; |
438 | int i = 0; | ||
439 | 438 | ||
440 | mutex_lock(&ipclock); | 439 | mutex_lock(&ipclock); |
441 | if (ipcdev.pdev == NULL) { | 440 | if (ipcdev.pdev == NULL) { |