diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
index 50fb6f5a8701df00466202fac5d17f79cc94ef48..e7c178dae8265c07b3178ba9b6b990a6c646fd2d 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
@@ -269,7 +269,7 @@ Index: linux-2.6.18-8.1.8/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
@@ -369,7 +369,7 @@ Index: linux-2.6.18-8.1.8/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s);
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
index 2660339bd0a5e0a24c1a36b6081068812f71b55e..acd81f8c28568b5127441bfca05da23213e03995 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
@@ -269,7 +269,7 @@ Index: linux-2.6.16.46-0.14/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
@@ -369,7 +369,7 @@ Index: linux-2.6.16.46-0.14/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s);
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
index 4db8dd38795dfe35ce4efb03777c7aadcff1db4e..0de0070c6e3d6b2dc9030bb480a999cafe1b0385 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6.13.4.patch
@@ -269,7 +269,7 @@ Index: linux-2.6.13.4/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
@@ -369,7 +369,7 @@ Index: linux-2.6.13.4/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s);
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
index b2abf46e0329a958810b2fd1a638edbcdb6938ff..4873794e12f47665acd2458d72b2c7f51f4401b3 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
@@ -459,7 +459,7 @@ Index: linux-2.6.5-7.201/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
@@ -578,7 +578,7 @@ Index: linux-2.6.5-7.201/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s);
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
index 3847e1e49911695e5340ef7abebb5581f8c88290..0140efdb19fa549afcbbe6a878b7266e41aa7271 100644
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
+++ b/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
@@ -460,7 +460,7 @@ Index: linux-2.6.9/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
@@ -560,7 +560,7 @@ Index: linux-2.6.9/fs/jbd/journal.c
 +		return -EIO;
 +	size = sizeof(struct transaction_stats_s);
 +	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->stats == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}