From: Stephen Boyd Date: Mon, 13 Jul 2015 23:54:04 +0000 (-0700) Subject: clk: h8300: Drop allocation printk and cleanup sizeof style X-Git-Tag: v4.14-rc1~4526^2~115 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9298f0267c7ed620f8d8261ded8518ebf8e89f9e;p=platform%2Fkernel%2Flinux-rpi.git clk: h8300: Drop allocation printk and cleanup sizeof style We don't need to print an error on allocation failures, drop it. While we're here, change the sizeof() to be sizeof(*) to make code more future proof. Cc: Yoshinori Sato Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/h8300/clk-h8s2678.c b/drivers/clk/h8300/clk-h8s2678.c index 4701b093..c121eb5 100644 --- a/drivers/clk/h8300/clk-h8s2678.c +++ b/drivers/clk/h8300/clk-h8s2678.c @@ -98,11 +98,9 @@ static void __init h8s2678_pll_clk_setup(struct device_node *node) } - pll_clock = kzalloc(sizeof(struct pll_clock), GFP_KERNEL); - if (!pll_clock) { - pr_err("%s: failed to alloc memory", clk_name); + pll_clock = kzalloc(sizeof(*pll_clock), GFP_KERNEL); + if (!pll_clock) return; - } pll_clock->sckcr = of_iomap(node, 0); if (pll_clock->sckcr == NULL) {