Message ID | 75f302b2-9fe0-4b3d-a132-85186c4d9445@web.de (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | clk: versaclock7: Return directly after a failed kasprintf() call in vc7_probe() | expand |
diff --git a/drivers/clk/clk-versaclock7.c b/drivers/clk/clk-versaclock7.c index f323263e32c3..96e6b05f2aac 100644 --- a/drivers/clk/clk-versaclock7.c +++ b/drivers/clk/clk-versaclock7.c @@ -1127,8 +1127,11 @@ static int vc7_probe(struct i2c_client *client) node_name = client->dev.of_node->name; /* Register APLL */ - apll_rate = vc7_get_apll_rate(vc7); apll_name = kasprintf(GFP_KERNEL, "%s_apll", node_name); + if (!apll_name) + return -ENOMEM; + + apll_rate = vc7_get_apll_rate(vc7); vc7->clk_apll.clk = clk_register_fixed_rate(&client->dev, apll_name, __clk_get_name(vc7->pin_xin), 0, apll_rate);