|
@@ -1398,10 +1398,8 @@ static int sahara_probe(struct platform_device *pdev)
|
|
int i;
|
|
int i;
|
|
|
|
|
|
dev = devm_kzalloc(&pdev->dev, sizeof(struct sahara_dev), GFP_KERNEL);
|
|
dev = devm_kzalloc(&pdev->dev, sizeof(struct sahara_dev), GFP_KERNEL);
|
|
- if (dev == NULL) {
|
|
|
|
- dev_err(&pdev->dev, "unable to alloc data struct.\n");
|
|
|
|
|
|
+ if (!dev)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
|
|
|
|
dev->device = &pdev->dev;
|
|
dev->device = &pdev->dev;
|
|
platform_set_drvdata(pdev, dev);
|
|
platform_set_drvdata(pdev, dev);
|