]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
pinctrl: imx: Check for memory allocation failure
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 6 May 2017 08:23:59 +0000 (10:23 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 22 May 2017 08:39:25 +0000 (10:39 +0200)
commit49af64e6b52208219d008cd445ca09c07a965105
treea9df9d63e06616375260c77f58ae137df8895c81
parentceba43834d1059b460cd05f92eff08c3fe5627f4
pinctrl: imx: Check for memory allocation failure

If 'devm_kzalloc' fails, a NULL pointer will be dereferenced.
Return -ENOMEM instead, as done for the other memory allocation just a
few lines below.
BTW, change the 'devm_kzalloc' into a 'devm_kcalloc'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/freescale/pinctrl-imx.c