From 6f7d485e13c6c07348cf9cfd1b735fe1bcf3caa9 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 22 Mar 2011 16:34:00 -0700 Subject: [PATCH] drivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv() i2c_master_recv() returns negative errno, or else the number of bytes read. Thus i2c_master_recv(client, i2c_data, 2) returns 2 instead of 1 in success case. [akpm@linux-foundation.org: make `ret' signed] Signed-off-by: Axel Lin Cc: Kalhan Trisal Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed