[PATCH RESEND] i2c: pnx: Fix crash due to wrong init of timer->data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



alg_data is already a pointer which must be passed directly.

Reported-by: Dieter Ripp <ripp@xxxxxxxxxxxxx>
Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
Cc: Ben Dooks <ben-i2c@xxxxxxxxx>
---

Ben, will there be another i2c update for 2.6.39? This fixes a crash,
so I think it is even stable-material.

 drivers/i2c/busses/i2c-pnx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 4d2168f..30365f3 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -66,7 +66,7 @@ static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data)
 		jiffies, expires);
 
 	timer->expires = jiffies + expires;
-	timer->data = (unsigned long)&alg_data;
+	timer->data = (unsigned long)alg_data;
 
 	add_timer(timer);
 }
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux