From: Xenia Ragiadakou Date: Thu, 6 Jun 2013 13:40:51 +0000 (+0300) Subject: staging: rtl8192u: fix read_nic_* functions X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~249 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3d42bf18784607b90b0661ac43f410713ff428b;p=pandora-kernel.git staging: rtl8192u: fix read_nic_* functions read_nic_*() functions are defined in r8192U_core.c. They call internally usb_control_msg() to read the nic registers and return the value read. Following a remark made by Dan Carpenter, if usb_control_msg() fails, the value returned will be invalid. To accommodate for this, this patch changes the functions to take a pointer as argument to set the value read and return 0 on success and the error status on failure, so that callers of read_nic_*() can check the return status. Some other fixes introduced in read_nic_*() functions are: The expressions (1< Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed