|
@@ -239,10 +239,8 @@ struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev,
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
|
|
client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL);
|
|
|
- if (!client) {
|
|
|
- dev_err(&pdev->dev, "no memory for adc client\n");
|
|
|
+ if (!client)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
- }
|
|
|
|
|
|
client->pdev = pdev;
|
|
|
client->is_ts = is_ts;
|
|
@@ -345,10 +343,8 @@ static int s3c_adc_probe(struct platform_device *pdev)
|
|
|
unsigned tmp;
|
|
|
|
|
|
adc = devm_kzalloc(dev, sizeof(struct adc_device), GFP_KERNEL);
|
|
|
- if (adc == NULL) {
|
|
|
- dev_err(dev, "failed to allocate adc_device\n");
|
|
|
+ if (!adc)
|
|
|
return -ENOMEM;
|
|
|
- }
|
|
|
|
|
|
spin_lock_init(&adc->lock);
|
|
|
|