1
0
Fork 0

mfd: ti_am335x_tscadc: Delete an error message for a failed memory allocation in ti_tscadc_probe()

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 <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
hifive-unleashed-5.1
Markus Elfring 2018-03-08 15:15:51 +01:00 committed by Lee Jones
parent 8349aeb6a7
commit a2e87fee55
1 changed files with 2 additions and 3 deletions

View File

@ -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);