From: Axel Lin Date: Tue, 25 Jan 2011 14:12:12 +0000 (+0000) Subject: intel_scu_ipc: fix signedness bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ecb5646cb098d9d1961c4b1af7b776c73b7541ac;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- 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) { int i, nc, bytes, d; u32 offset = 0; - u32 err = 0; + int err; u8 cbuf[IPC_WWBUF_SIZE] = { }; u32 *wbuf = (u32 *)&cbuf; @@ -404,7 +404,7 @@ EXPORT_SYMBOL(intel_scu_ipc_update_register); */ int intel_scu_ipc_simple_command(int cmd, int sub) { - u32 err = 0; + int err; mutex_lock(&ipclock); if (ipcdev.pdev == NULL) { @@ -434,8 +434,7 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command); int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen, u32 *out, int outlen) { - u32 err = 0; - int i = 0; + int i, err; mutex_lock(&ipclock); if (ipcdev.pdev == NULL) {