diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-bcm2835.c')
| -rw-r--r-- | drivers/i2c/busses/i2c-bcm2835.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index c60719577fc3..214ff9700efe 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c | |||
| @@ -225,10 +225,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) | |||
| 225 | struct i2c_adapter *adap; | 225 | struct i2c_adapter *adap; |
| 226 | 226 | ||
| 227 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); | 227 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); |
| 228 | if (!i2c_dev) { | 228 | if (!i2c_dev) |
| 229 | dev_err(&pdev->dev, "Cannot allocate i2c_dev\n"); | ||
| 230 | return -ENOMEM; | 229 | return -ENOMEM; |
| 231 | } | ||
| 232 | platform_set_drvdata(pdev, i2c_dev); | 230 | platform_set_drvdata(pdev, i2c_dev); |
| 233 | i2c_dev->dev = &pdev->dev; | 231 | i2c_dev->dev = &pdev->dev; |
| 234 | init_completion(&i2c_dev->completion); | 232 | init_completion(&i2c_dev->completion); |
