Skip to contentSkip to conversation

Misc Driver fixes for 2.6.19-rc6

PATCH New Greg KH 2 participants 4 messages Nov 17, 2006

Subsystems (4)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 Misc Driver fixes for 2.6.19-rc6

Here are some driver related fixes for 2.6.19-rc6.

Three patches here:
- aoe bugfix that is on Adrian's list.
- w1 bugfix to prevent a memory leak
- debugfs fix to properly detect errors

All of these patches have been in the -mm tree for a quite a while.

Please pull from:

	git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/

or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/

Patches will be sent as a follow-on to this message to lkml for people to see.

thanks,

greg k-h

 drivers/block/aoe/aoeblk.c     |    1 +
 drivers/w1/masters/matrox_w1.c |    2 ++
 fs/debugfs/inode.c             |    4 ++--
 3 files changed, 5 insertions(+), 2 deletions(-)

---------------

Akinobu Mita (1):
debugfs: check return value correctly

Amol Lad (1):
W1: ioremap balanced with iounmap

Dennis Stosberg (1):
aoe: Add forgotten NULL at end of attribute list in aoeblk.c

#1 lore raw

PATCH 1/3 W1: ioremap balanced with iounmap

From: Amol Lad <[email protected]>

ioremap must be balanced with iounmap in error path.

Please consider for 2.6.19.

---
 drivers/w1/masters/matrox_w1.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/w1/masters/matrox_w1.c +2 -0
index 2788b8c..6f9d880 100644
@@ -215,6 +215,8 @@ static int __devinit matrox_w1_probe(str
 	return 0;
 
 err_out_free_device:
+	if (dev->virt_addr)
+		iounmap(dev->virt_addr);
 	kfree(dev);
 
 	return err;
Signature · 1 line
1.4.3.5
#2 lore raw

PATCH 2/3 debugfs: check return value correctly

From: Akinobu Mita <[email protected]>

The return value is stored in "*dentry", not in "dentry".

---
 fs/debugfs/inode.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/debugfs/inode.c +2 -2
index e77676d..a736d44 100644
@@ -147,13 +147,13 @@ static int debugfs_create_by_name(const
 	*dentry = NULL;
 	mutex_lock(&parent->d_inode->i_mutex);
 	*dentry = lookup_one_len(name, parent, strlen(name));
-	if (!IS_ERR(dentry)) {
+	if (!IS_ERR(*dentry)) {
 		if ((mode & S_IFMT) == S_IFDIR)
 			error = debugfs_mkdir(parent->d_inode, *dentry, mode);
 		else 
 			error = debugfs_create(parent->d_inode, *dentry, mode);
 	} else
-		error = PTR_ERR(dentry);
+		error = PTR_ERR(*dentry);
 	mutex_unlock(&parent->d_inode->i_mutex);
 
 	return error;
Signature · 1 line
1.4.3.5
#3 lore raw

PATCH 3/3 aoe: Add forgotten NULL at end of attribute list in aoeblk.c

From: Dennis Stosberg <[email protected]>

This caused the system to stall when the aoe module was loaded. The error was introduced in commit 4ca5224f3ea4779054d96e885ca9b3980801ce13

---
 drivers/block/aoe/aoeblk.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/block/aoe/aoeblk.c +1 -0
index d433f27..aa25f8b 100644
@@ -68,6 +68,7 @@ static struct attribute *aoe_attrs[] = {
 	&disk_attr_mac.attr,
 	&disk_attr_netif.attr,
 	&disk_attr_fwver.attr,
+	NULL
 };
 
 static const struct attribute_group attr_group = {
Signature · 1 line
1.4.3.5