regulator: tps62360: Remove redundant error message
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
		
					parent
					
						
							
								38dbfb59d1
							
						
					
				
			
			
				commit
				
					
						33e63ba6c6
					
				
			
		
					 1 changed files with 2 additions and 7 deletions
				
			
		| 
						 | 
					@ -299,10 +299,8 @@ static struct tps62360_regulator_platform_data *
 | 
				
			||||||
	struct device_node *np = dev->of_node;
 | 
						struct device_node *np = dev->of_node;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
 | 
						pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
 | 
				
			||||||
	if (!pdata) {
 | 
						if (!pdata)
 | 
				
			||||||
		dev_err(dev, "Memory alloc failed for platform data\n");
 | 
					 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node);
 | 
						pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node);
 | 
				
			||||||
	if (!pdata->reg_init_data) {
 | 
						if (!pdata->reg_init_data) {
 | 
				
			||||||
| 
						 | 
					@ -377,11 +375,8 @@ static int tps62360_probe(struct i2c_client *client,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
 | 
						tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
 | 
				
			||||||
	if (!tps) {
 | 
						if (!tps)
 | 
				
			||||||
		dev_err(&client->dev, "%s(): Memory allocation failed\n",
 | 
					 | 
				
			||||||
						__func__);
 | 
					 | 
				
			||||||
		return -ENOMEM;
 | 
							return -ENOMEM;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tps->en_discharge = pdata->en_discharge;
 | 
						tps->en_discharge = pdata->en_discharge;
 | 
				
			||||||
	tps->en_internal_pulldn = pdata->en_internal_pulldn;
 | 
						tps->en_internal_pulldn = pdata->en_internal_pulldn;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue