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/nxt200x.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/nxt200x.c')
-rw-r--r-- | drivers/media/dvb/frontends/nxt200x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index 55671cb5255e..87c286ee6a00 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c | |||
@@ -896,9 +896,9 @@ static int nxt2002_init(struct dvb_frontend* fe) | |||
896 | } | 896 | } |
897 | 897 | ||
898 | ret = nxt2002_load_firmware(fe, fw); | 898 | ret = nxt2002_load_firmware(fe, fw); |
899 | release_firmware(fw); | ||
899 | if (ret) { | 900 | if (ret) { |
900 | printk("nxt2002: Writing firmware to device failed\n"); | 901 | printk("nxt2002: Writing firmware to device failed\n"); |
901 | release_firmware(fw); | ||
902 | return ret; | 902 | return ret; |
903 | } | 903 | } |
904 | printk("nxt2002: Firmware upload complete\n"); | 904 | printk("nxt2002: Firmware upload complete\n"); |
@@ -960,9 +960,9 @@ static int nxt2004_init(struct dvb_frontend* fe) | |||
960 | } | 960 | } |
961 | 961 | ||
962 | ret = nxt2004_load_firmware(fe, fw); | 962 | ret = nxt2004_load_firmware(fe, fw); |
963 | release_firmware(fw); | ||
963 | if (ret) { | 964 | if (ret) { |
964 | printk("nxt2004: Writing firmware to device failed\n"); | 965 | printk("nxt2004: Writing firmware to device failed\n"); |
965 | release_firmware(fw); | ||
966 | return ret; | 966 | return ret; |
967 | } | 967 | } |
968 | printk("nxt2004: Firmware upload complete\n"); | 968 | printk("nxt2004: Firmware upload complete\n"); |