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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 May 2017 19:30:19 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-sh@...r.kernel.org, Rich Felker <dalias@...c.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] sh-clk: Improve a size determination in
 sh_clk_fsidiv_register()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 16 May 2017 18:42:22 +0200

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/sh/clk/cpg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
index 7442bc130055..f23464bbeb7c 100644
--- a/drivers/sh/clk/cpg.c
+++ b/drivers/sh/clk/cpg.c
@@ -470,6 +470,5 @@ int __init sh_clk_fsidiv_register(struct clk *clks, int nr)
 	int i;
 
 	for (i = 0; i < nr; i++) {
-
-		map = kzalloc(sizeof(struct clk_mapping), GFP_KERNEL);
+		map = kzalloc(sizeof(*map), GFP_KERNEL);
 		if (!map) {
-- 
2.13.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ