Messages in this thread Patch in this message | | | Subject | Re: [PATCH] firmware: avoiding multiple replication for same firmware file | From | Jaswinder Singh <> | Date | Wed, 06 Aug 2008 15:46:24 +0530 |
| |
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);
| |