Commit a3d1d8a7 authored by Markus Elfring's avatar Markus Elfring Committed by Krzysztof Kozlowski

ARM: SAMSUNG: Remove printk for failed memory allocation

Omit an extra message for a memory allocation failure in adc.c and
platformdata.c.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 0640357b
...@@ -239,10 +239,8 @@ struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev, ...@@ -239,10 +239,8 @@ struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev,
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL); client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL);
if (!client) { if (!client)
dev_err(&pdev->dev, "no memory for adc client\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
client->pdev = pdev; client->pdev = pdev;
client->is_ts = is_ts; client->is_ts = is_ts;
...@@ -345,10 +343,8 @@ static int s3c_adc_probe(struct platform_device *pdev) ...@@ -345,10 +343,8 @@ static int s3c_adc_probe(struct platform_device *pdev)
unsigned tmp; unsigned tmp;
adc = devm_kzalloc(dev, sizeof(struct adc_device), GFP_KERNEL); adc = devm_kzalloc(dev, sizeof(struct adc_device), GFP_KERNEL);
if (adc == NULL) { if (!adc)
dev_err(dev, "failed to allocate adc_device\n");
return -ENOMEM; return -ENOMEM;
}
spin_lock_init(&adc->lock); spin_lock_init(&adc->lock);
......
...@@ -29,10 +29,8 @@ void __init *s3c_set_platdata(void *pd, size_t pdsize, ...@@ -29,10 +29,8 @@ void __init *s3c_set_platdata(void *pd, size_t pdsize,
} }
npd = kmemdup(pd, pdsize, GFP_KERNEL); npd = kmemdup(pd, pdsize, GFP_KERNEL);
if (!npd) { if (!npd)
printk(KERN_ERR "%s: cannot clone platform data\n", pdev->name);
return NULL; return NULL;
}
pdev->dev.platform_data = npd; pdev->dev.platform_data = npd;
return npd; return npd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment