diff options
-rw-r--r-- | drivers/regulator/tps65910-regulator.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 521c9252be18..11af48e7186a 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
@@ -1101,7 +1101,7 @@ static struct tps65910_board *tps65910_parse_dt_reg_data( | |||
1101 | matches = tps65911_matches; | 1101 | matches = tps65911_matches; |
1102 | break; | 1102 | break; |
1103 | default: | 1103 | default: |
1104 | pr_err("Invalid tps chip version\n"); | 1104 | dev_err(&pdev->dev, "Invalid tps chip version\n"); |
1105 | return NULL; | 1105 | return NULL; |
1106 | } | 1106 | } |
1107 | 1107 | ||
@@ -1150,12 +1150,16 @@ static __devinit int tps65910_probe(struct platform_device *pdev) | |||
1150 | if (!pmic_plat_data && tps65910->dev->of_node) | 1150 | if (!pmic_plat_data && tps65910->dev->of_node) |
1151 | pmic_plat_data = tps65910_parse_dt_reg_data(pdev); | 1151 | pmic_plat_data = tps65910_parse_dt_reg_data(pdev); |
1152 | 1152 | ||
1153 | if (!pmic_plat_data) | 1153 | if (!pmic_plat_data) { |
1154 | dev_err(&pdev->dev, "Platform data not found\n"); | ||
1154 | return -EINVAL; | 1155 | return -EINVAL; |
1156 | } | ||
1155 | 1157 | ||
1156 | pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); | 1158 | pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); |
1157 | if (!pmic) | 1159 | if (!pmic) { |
1160 | dev_err(&pdev->dev, "Memory allocation failed for pmic\n"); | ||
1158 | return -ENOMEM; | 1161 | return -ENOMEM; |
1162 | } | ||
1159 | 1163 | ||
1160 | mutex_init(&pmic->mutex); | 1164 | mutex_init(&pmic->mutex); |
1161 | pmic->mfd = tps65910; | 1165 | pmic->mfd = tps65910; |
@@ -1179,7 +1183,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev) | |||
1179 | info = tps65911_regs; | 1183 | info = tps65911_regs; |
1180 | break; | 1184 | break; |
1181 | default: | 1185 | default: |
1182 | pr_err("Invalid tps chip version\n"); | 1186 | dev_err(&pdev->dev, "Invalid tps chip version\n"); |
1183 | return -ENODEV; | 1187 | return -ENODEV; |
1184 | } | 1188 | } |
1185 | 1189 | ||