lkml.org 
[lkml]   [2008]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] firmware: avoiding multiple replication for same firmware file
From
Date
On Wed, 2008-08-06 at 15:05 +0530, Jaswinder Singh wrote:
> @@ -445,12 +484,22 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
> retval = -ENOENT;
> release_firmware(fw_priv->fw);
> *firmware_p = NULL;
> + list_del(&tmp->list);
> + kfree(tmp->name);
> + kfree(tmp);
> }
> fw_priv->fw = NULL;
> mutex_unlock(&fw_lock);

This is also not required as we are doing this in release_firmware().
So :

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index c886113..7b268d1 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -484,9 +484,6 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
retval = -ENOENT;
release_firmware(fw_priv->fw);
*firmware_p = NULL;
- list_del(&tmp->list);
- kfree(tmp->name);
- kfree(tmp);
}
fw_priv->fw = NULL;
mutex_unlock(&fw_lock);



\
 
 \ /
  Last update: 2008-08-06 12:21    [W:0.052 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site