|
@@ -225,10 +225,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
|
|
struct i2c_adapter *adap;
|
|
struct i2c_adapter *adap;
|
|
|
|
|
|
i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
|
|
i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
|
|
- if (!i2c_dev) {
|
|
|
|
- dev_err(&pdev->dev, "Cannot allocate i2c_dev\n");
|
|
|
|
|
|
+ if (!i2c_dev)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
platform_set_drvdata(pdev, i2c_dev);
|
|
platform_set_drvdata(pdev, i2c_dev);
|
|
i2c_dev->dev = &pdev->dev;
|
|
i2c_dev->dev = &pdev->dev;
|
|
init_completion(&i2c_dev->completion);
|
|
init_completion(&i2c_dev->completion);
|