lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 18 Dec 2010 23:05:02 +0100 (CET)
From:	Jesper Juhl <jj@...osbits.net>
To:	linux-media@...r.kernel.org
cc:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Steven Toth <stoth@...nellabs.com>, Tejun Heo <tj@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] saa7164: Remove pointless conditional and save a few bytes
 in saa7164_downloadfirmware().

Hi,

release_firmware() just does nothing if passed a NULL pointer. So there's 
no reason to test before the call in 
saa7164-fw.c::saa7164_downloadfirmware().

Removing the pointless conditional also saves a few bytes.
before:
   text    data     bss     dec     hex filename
   7943     112    2144   10199    27d7 drivers/media/video/saa7164/saa7164-fw.o
after:
   text    data     bss     dec     hex filename
   7931     112    2136   10179    27c3 drivers/media/video/saa7164/saa7164-fw.o


Signed-off-by: Jesper Juhl <jj@...osbits.net>
---
 saa7164-fw.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

 compile tested only.

diff --git a/drivers/media/video/saa7164/saa7164-fw.c b/drivers/media/video/saa7164/saa7164-fw.c
index 484533c..af71367 100644
--- a/drivers/media/video/saa7164/saa7164-fw.c
+++ b/drivers/media/video/saa7164/saa7164-fw.c
@@ -608,8 +608,6 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev)
 	ret = 0;
 
 out:
-	if (fw)
-		release_firmware(fw);
-
+	release_firmware(fw);
 	return ret;
 }



-- 
Jesper Juhl <jj@...osbits.net>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ