Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba3e217a authored by Arvind Yadav's avatar Arvind Yadav Committed by Linus Walleij
Browse files

gpio: brcmstb: Handle return value of devm_kasprintf



devm_kasprintf() can fail here and we must check its return value.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6437c7ba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -485,6 +485,10 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)
		gc->of_node = np;
		gc->owner = THIS_MODULE;
		gc->label = devm_kasprintf(dev, GFP_KERNEL, "%pOF", dev->of_node);
		if (!gc->label) {
			err = -ENOMEM;
			goto fail;
		}
		gc->base = gpio_base;
		gc->of_gpio_n_cells = 2;
		gc->of_xlate = brcmstb_gpio_of_xlate;