clk: basic-types: Remove useless allocation failure printks
Printing an error on kmalloc() failures is unnecessary. Remove the print and use *ptr in sizeof() for future-proof code. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
@@ -430,11 +430,9 @@ static struct clk *_register_divider(struct device *dev, const char *name,
|
||||
}
|
||||
|
||||
/* allocate the divider */
|
||||
div = kzalloc(sizeof(struct clk_divider), GFP_KERNEL);
|
||||
if (!div) {
|
||||
pr_err("%s: could not allocate divider clk\n", __func__);
|
||||
div = kzalloc(sizeof(*div), GFP_KERNEL);
|
||||
if (!div)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
init.name = name;
|
||||
init.ops = &clk_divider_ops;
|
||||
|
Fai riferimento in un nuovo problema
Block a user