sony-laptop: Fix handling sony_nc_hotkeys_decode result
sony_nv_hotkeys_decode can return a negative value. real_ev is a u32 variable. The check for real_ev > 0 is incorrect. Use an intermediate ret variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com> [dvhart: clarify commit msg, drop superfluous else block] Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
Showing
想要评论请 注册 或 登录