i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt()
Subsystems (3)
PATCH 1/1 i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt()
From: Markus Elfring <[email protected]>
Date: Thu, 1 Feb 2018 17:17:19 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/i2c/muxes/i2c-mux-reg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/muxes/i2c-mux-reg.c +1 -3
@@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux, values =devm_kzalloc (&pdev->dev,sizeof (*mux->data.values) * mux->data.n_values,GFP_KERNEL ); -if (!values) { -dev_err (&pdev->dev,"Cannot allocate values array" ); +if (!values)return -ENOMEM ; - }for_each_child_of_node (np, child) {of_property_read_u32 (child,"reg" , values + i);
Signature · 1 line
2.16.1
Quoted 5 lines · SF Markus Elfring
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Reviewed-by Alexander Sverdlin <[email protected]>
Quoted 20 lines
--- drivers/i2c/muxes/i2c-mux-reg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/i2c/muxes/i2c-mux-reg.c +1
-3@@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux, values =devm_kzalloc (&pdev->dev,sizeof (*mux->data.values) * mux->data.n_values,GFP_KERNEL ); -if (!values) { -dev_err (&pdev->dev,"Cannot allocate values array" ); +if (!values)return -ENOMEM ; - }for_each_child_of_node (np, child) {of_property_read_u32 (child,"reg" , values + i);
Signature · 2 lines
Best regards, Alexander Sverdlin.
Peter Rosin
AppliedQuoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Thu, 1 Feb 2018 17:17:19 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Applied to i2c-mux/for-next with a shortened subject.
Cheers,
Peter