Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623599 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-04-14 11:20 +0200 |
| Last post | 2017-04-14 11:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 03/10] pinctrl: imx: Return directly after a failed devm_kcalloc() in imx_pinctrl_parse_functions() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-14 11:20 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-04-14 11:20 +0200 |
| Subject | [PATCH 03/10] pinctrl: imx: Return directly after a failed devm_kcalloc() in imx_pinctrl_parse_functions() |
| Message-ID | <tw5yy-7IM-21@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 13 Apr 2017 15:12:20 +0200
Add a check for a null pointer and return an error code
after a memory allocation failure was detected.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/pinctrl/freescale/pinctrl-imx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 975ed40cb774..f835e8210ace 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -585,6 +585,8 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
func->num_group_names,
sizeof(*func->group_names),
GFP_KERNEL);
+ if (!func->group_names)
+ return -ENOMEM;
for_each_child_of_node(np, child) {
func->group_names[i] = child->name;
--
2.12.2
Back to top | Article view | linux.kernel
csiph-web