diff options
| -rw-r--r-- | drivers/mfd/mfd-core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index d1c8605d4ed4..ec99f681e773 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c | |||
| @@ -38,10 +38,12 @@ static int mfd_add_device(struct device *parent, int id, | |||
| 38 | pdev->dev.parent = parent; | 38 | pdev->dev.parent = parent; |
| 39 | platform_set_drvdata(pdev, cell->driver_data); | 39 | platform_set_drvdata(pdev, cell->driver_data); |
| 40 | 40 | ||
| 41 | ret = platform_device_add_data(pdev, | 41 | if (cell->data_size) { |
| 42 | cell->platform_data, cell->data_size); | 42 | ret = platform_device_add_data(pdev, |
| 43 | if (ret) | 43 | cell->platform_data, cell->data_size); |
| 44 | goto fail_res; | 44 | if (ret) |
| 45 | goto fail_res; | ||
| 46 | } | ||
| 45 | 47 | ||
| 46 | for (r = 0; r < cell->num_resources; r++) { | 48 | for (r = 0; r < cell->num_resources; r++) { |
| 47 | res[r].name = cell->resources[r].name; | 49 | res[r].name = cell->resources[r].name; |
