mfd/ti_am335x_tscadc: Delete an error message for a failed memory allocation in ti_tscadc_probe()
Subsystems (2)
PATCH 1/1 mfd/ti_am335x_tscadc: Delete an error message for a failed memory allocation in ti_tscadc_probe()
From: Markus Elfring <[email protected]>
Date: Tue, 16 Jan 2018 10:07:43 +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/mfd/ti_am335x_tscadc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mfd/ti_am335x_tscadc.c +2 -3
@@ -169,10 +169,9 @@ static int ti_tscadc_probe(struct platform_device *pdev)/* Allocate memory for device */ tscadc =devm_kzalloc (&pdev->dev,sizeof (*tscadc),GFP_KERNEL ); -if (!tscadc) { -dev_err (&pdev->dev,"failed to allocate memory.\n" ); +if (!tscadc)return -ENOMEM ; - } + tscadc->dev = &pdev->dev; err =platform_get_irq (pdev,0 );
Signature · 1 line
2.15.1