aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-13 01:54:56 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-13 01:54:56 +0000
commitc931b21161bf3d8a8cab193045b7deb52f914fb2 (patch)
tree6f4c70017b90c8dddb4845ce8a363d61268e016d /target/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch
parent738e5ca558af0a32073576d9a361d0b5e6383e8e (diff)
downloadupstream-c931b21161bf3d8a8cab193045b7deb52f914fb2.tar.gz
upstream-c931b21161bf3d8a8cab193045b7deb52f914fb2.tar.bz2
upstream-c931b21161bf3d8a8cab193045b7deb52f914fb2.zip
change prefix for kernelpatchbase 2.6.26
SVN-Revision: 13619
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch')
-rwxr-xr-xtarget/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch b/target/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch
new file mode 100755
index 0000000000..be17c7403f
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.26/1148-Fix-possible-null-pointer-dereference-in-s3c24xx_i2c.patch
@@ -0,0 +1,36 @@
+From 2d2a18cc16e881f2b2d3584e5c8a3f2f949bf22f Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@openmoko.org>
+Date: Fri, 25 Jul 2008 23:06:10 +0100
+Subject: [PATCH] Fix possible null pointer dereference in s3c24xx_i2c_resume
+
+From 0b9bae6aed5268707b348e48a01411ba420844e1 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@openmoko.org>
+Date: Tue, 27 May 2008 14:41:35 +0200
+Subject: [PATCH] [janitor] Fix possible null pointer dereference
+ Judging by the control flow of the resume method i2c->suspended++ could
+ lead to a null pointer dereference.
+---
+ drivers/i2c/busses/i2c-s3c2410.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
+index 02459d7..58970fe 100644
+--- a/drivers/i2c/busses/i2c-s3c2410.c
++++ b/drivers/i2c/busses/i2c-s3c2410.c
+@@ -918,10 +918,10 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
+ {
+ struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+
+- if (i2c != NULL)
++ if (i2c != NULL) {
+ s3c24xx_i2c_init(i2c);
+-
+- i2c->suspended--;
++ i2c->suspended--;
++ }
+
+ return 0;
+ }
+--
+1.5.6.3
+