diff options
author | Magnus Damm <magnus@valinux.co.jp> | 2006-07-10 07:44:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:15 -0400 |
commit | 73ca66b97b73257a7d832d502c36fc19fe847809 (patch) | |
tree | d39f50b1931d67c51e56f891b785be1143599177 /drivers/media/dvb/frontends/sp8870.c | |
parent | 454d6fbc48374be8f53b9bafaa86530cf8eb3bc1 (diff) |
[PATCH] release_firmware() fixes
Use release_firmware() to free requested resources.
According to Documentation/firmware_class/README the request_firmware()
call should be followed by a release_firmware(). Some drivers do not
however free the firmware previously allocated with request_firmware().
This patch tries to fix this by making sure that release_firmware() is used
as expected.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/sp8870.c')
-rw-r--r-- | drivers/media/dvb/frontends/sp8870.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c index 44ec5b9a4695..d98fd5c2e13e 100644 --- a/drivers/media/dvb/frontends/sp8870.c +++ b/drivers/media/dvb/frontends/sp8870.c | |||
@@ -318,7 +318,6 @@ static int sp8870_init (struct dvb_frontend* fe) | |||
318 | printk("sp8870: waiting for firmware upload (%s)...\n", SP8870_DEFAULT_FIRMWARE); | 318 | printk("sp8870: waiting for firmware upload (%s)...\n", SP8870_DEFAULT_FIRMWARE); |
319 | if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) { | 319 | if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) { |
320 | printk("sp8870: no firmware upload (timeout or file not found?)\n"); | 320 | printk("sp8870: no firmware upload (timeout or file not found?)\n"); |
321 | release_firmware(fw); | ||
322 | return -EIO; | 321 | return -EIO; |
323 | } | 322 | } |
324 | 323 | ||
@@ -327,6 +326,7 @@ static int sp8870_init (struct dvb_frontend* fe) | |||
327 | release_firmware(fw); | 326 | release_firmware(fw); |
328 | return -EIO; | 327 | return -EIO; |
329 | } | 328 | } |
329 | release_firmware(fw); | ||
330 | printk("sp8870: firmware upload complete\n"); | 330 | printk("sp8870: firmware upload complete\n"); |
331 | 331 | ||
332 | /* enable TS output and interface pins */ | 332 | /* enable TS output and interface pins */ |