[ar71xx] fix GPIO function select bit definitions (based on a patch by Jonas <jmajau...
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch
1 From 2d2a18cc16e881f2b2d3584e5c8a3f2f949bf22f Mon Sep 17 00:00:00 2001
2 From: Holger Freyther <zecke@openmoko.org>
3 Date: Fri, 25 Jul 2008 23:06:10 +0100
4 Subject: [PATCH] Fix possible null pointer dereference in s3c24xx_i2c_resume
5
6 From 0b9bae6aed5268707b348e48a01411ba420844e1 Mon Sep 17 00:00:00 2001
7 From: Holger Freyther <zecke@openmoko.org>
8 Date: Tue, 27 May 2008 14:41:35 +0200
9 Subject: [PATCH] [janitor] Fix possible null pointer dereference
10 Judging by the control flow of the resume method i2c->suspended++ could
11 lead to a null pointer dereference.
12 ---
13 drivers/i2c/busses/i2c-s3c2410.c | 6 +++---
14 1 files changed, 3 insertions(+), 3 deletions(-)
15
16 diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
17 index 02459d7..58970fe 100644
18 --- a/drivers/i2c/busses/i2c-s3c2410.c
19 +++ b/drivers/i2c/busses/i2c-s3c2410.c
20 @@ -918,10 +918,10 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
21 {
22 struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
23
24 - if (i2c != NULL)
25 + if (i2c != NULL) {
26 s3c24xx_i2c_init(i2c);
27 -
28 - i2c->suspended--;
29 + i2c->suspended--;
30 + }
31
32 return 0;
33 }
34 --
35 1.5.6.3
36
This page took 0.05487 seconds and 5 git commands to generate.