浏览代码

sony: fix rfkill code

During the rfkill conversion I added code to call
sony_nc_rfkill_set with the wrong argument, causing
a segfault Reinette reported. The compiler could not
catch that because the argument is, and needs to be,
void *.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg 16 年之前
父节点
当前提交
fc240e3fc5
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/platform/x86/sony-laptop.c

+ 1 - 2
drivers/platform/x86/sony-laptop.c

@@ -1135,8 +1135,7 @@ static void sony_nc_rfkill_update()
 
 		if (hwblock) {
 			if (rfkill_set_hw_state(sony_rfkill_devices[i], true))
-				sony_nc_rfkill_set(sony_rfkill_devices[i],
-						   true);
+				sony_nc_rfkill_set((void *)i, true);
 			continue;
 		}