From ded9757de77adb99448ab46d12602aad60d3a737 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 19 Jul 2006 12:49:39 -0300 Subject: [PATCH] release_firmware() fixes From: Magnus Damm 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. kernel-sync: backport from kernel to v4l/dvb tree Signed-off-by: Magnus Damm Acked-by: Marcel Holtmann Cc: Mauro Carvalho Chehab Cc: "John W. Linville" Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/frontends/sp887x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/sp887x.c') diff --git a/linux/drivers/media/dvb/frontends/sp887x.c b/linux/drivers/media/dvb/frontends/sp887x.c index b0a2b02f6..5c2f8f4e0 100644 --- a/linux/drivers/media/dvb/frontends/sp887x.c +++ b/linux/drivers/media/dvb/frontends/sp887x.c @@ -520,9 +520,9 @@ static int sp887x_init(struct dvb_frontend* fe) } ret = sp887x_initial_setup(fe, fw); + release_firmware(fw); if (ret) { printk("sp887x: writing firmware to device failed\n"); - release_firmware(fw); return ret; } printk("sp887x: firmware upload complete\n"); -- cgit v1.2.3