All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1062033440.16799.22.camel@dooby.cs.berkeley.edu>

diff --git a/a/1.txt b/N1/1.txt
index 56bc177..a67bc5c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -38,8 +38,8 @@ integrating it into the kernel build process.
  			kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), 
  			GFP_KERNEL);
  
--		if (rdwr_pa = NULL) return -ENOMEM;
-+		if (tmp_pa = NULL) return -ENOMEM;
+-		if (rdwr_pa == NULL) return -ENOMEM;
++		if (tmp_pa == NULL) return -ENOMEM;
  
 -		if (copy_from_user(rdwr_pa, rdwr_arg.msgs,
 +		if (copy_from_user(tmp_pa, rdwr_arg.msgs,
@@ -51,13 +51,13 @@ integrating it into the kernel build process.
  
 -		data_ptrs = (u8 **) kmalloc(rdwr_arg.nmsgs * sizeof(u8 *),
 -					    GFP_KERNEL);
--		if (data_ptrs = NULL) {
+-		if (data_ptrs == NULL) {
 -			kfree(rdwr_pa);
 +		rdwr_pa = (struct i2c_msg *)
 +			kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), 
 +			GFP_KERNEL);
 +
-+		if (rdwr_pa = NULL) {
++		if (rdwr_pa == NULL) {
 +			kfree(tmp_pa);
  			return -ENOMEM;
  		}
@@ -74,7 +74,7 @@ integrating it into the kernel build process.
  			}
 -			data_ptrs[i] = rdwr_pa[i].buf;
  			rdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL);
- 			if(rdwr_pa[i].buf = NULL) {
+ 			if(rdwr_pa[i].buf == NULL) {
  				res = -ENOMEM;
  				break;
  			}
diff --git a/a/content_digest b/N1/content_digest
index 99c1435..2524742 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -7,9 +7,9 @@
  "ref\020030814190954.GA2492@kroah.com\0"
  "ref\01060912895.1006.7160.camel@dooby.cs.berkeley.edu\0"
  "ref\020030815211329.GB4920@kroah.com\0"
- "From\0rtjohnso@eecs.berkeley.edu (Robert T. Johnson)\0"
- "Subject\0[PATCH 2.4] i2c-dev user/kernel bug and mem leak\0"
- "Date\0Thu, 19 May 2005 06:24:15 +0000\0"
+ "From\0Robert T. Johnson <rtjohnso@eecs.berkeley.edu>\0"
+ "Subject\0Re: [PATCH 2.4] i2c-dev user/kernel bug and mem leak\0"
+ "Date\027 Aug 2003 18:17:19 -0700\0"
  "To\0Greg KH <greg@kroah.com>\0"
  "Cc\0linux-kernel@vger.kernel.org"
   Jean Delvare <khali@linux-fr.org>
@@ -58,8 +58,8 @@
  " \t\t\tkmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), \n"
  " \t\t\tGFP_KERNEL);\n"
  " \n"
- "-\t\tif (rdwr_pa = NULL) return -ENOMEM;\n"
- "+\t\tif (tmp_pa = NULL) return -ENOMEM;\n"
+ "-\t\tif (rdwr_pa == NULL) return -ENOMEM;\n"
+ "+\t\tif (tmp_pa == NULL) return -ENOMEM;\n"
  " \n"
  "-\t\tif (copy_from_user(rdwr_pa, rdwr_arg.msgs,\n"
  "+\t\tif (copy_from_user(tmp_pa, rdwr_arg.msgs,\n"
@@ -71,13 +71,13 @@
  " \n"
  "-\t\tdata_ptrs = (u8 **) kmalloc(rdwr_arg.nmsgs * sizeof(u8 *),\n"
  "-\t\t\t\t\t    GFP_KERNEL);\n"
- "-\t\tif (data_ptrs = NULL) {\n"
+ "-\t\tif (data_ptrs == NULL) {\n"
  "-\t\t\tkfree(rdwr_pa);\n"
  "+\t\trdwr_pa = (struct i2c_msg *)\n"
  "+\t\t\tkmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), \n"
  "+\t\t\tGFP_KERNEL);\n"
  "+\n"
- "+\t\tif (rdwr_pa = NULL) {\n"
+ "+\t\tif (rdwr_pa == NULL) {\n"
  "+\t\t\tkfree(tmp_pa);\n"
  " \t\t\treturn -ENOMEM;\n"
  " \t\t}\n"
@@ -94,7 +94,7 @@
  " \t\t\t}\n"
  "-\t\t\tdata_ptrs[i] = rdwr_pa[i].buf;\n"
  " \t\t\trdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL);\n"
- " \t\t\tif(rdwr_pa[i].buf = NULL) {\n"
+ " \t\t\tif(rdwr_pa[i].buf == NULL) {\n"
  " \t\t\t\tres = -ENOMEM;\n"
  " \t\t\t\tbreak;\n"
  " \t\t\t}\n"
@@ -134,4 +134,4 @@
  " \n"
  " \tcase I2C_SMBUS:"
 
-d10eb7972fed4237f2af6730dae25a32f8cb198f133c00f951b9243cdebdba3b
+7c8a91274b2fb86718bc4a531456327329d8e945b5df70e7606ae41d37c33001

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.