Skip to contentSkip to conversation

sony: fix rfkill code

PATCH New Johannes Berg 1 participant 1 message Jun 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 *.

---
 drivers/platform/x86/sony-laptop.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/sony-laptop.c +1 -2
@@ -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;
 		}