Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Axel Lin and committed by
Mark Brown
240a5291 cad877ef

+10 -9
+10 -9
drivers/regulator/lp8755.c
··· 497 497 if (!pchip->pdata) 498 498 return -ENOMEM; 499 499 ret = lp8755_init_data(pchip); 500 - if (ret < 0) 501 - goto err_chip_init; 500 + if (ret < 0) { 501 + dev_err(&client->dev, "fail to initialize chip\n"); 502 + return ret; 503 + } 502 504 } 503 505 504 506 ret = lp8755_regulator_init(pchip); 505 - if (ret < 0) 507 + if (ret < 0) { 508 + dev_err(&client->dev, "fail to initialize regulators\n"); 506 509 goto err_regulator; 510 + } 507 511 508 512 pchip->irq = client->irq; 509 513 ret = lp8755_int_config(pchip); 510 - if (ret < 0) 514 + if (ret < 0) { 515 + dev_err(&client->dev, "fail to irq config\n"); 511 516 goto err_irq; 517 + } 512 518 513 519 return ret; 514 520 515 521 err_irq: 516 - dev_err(&client->dev, "fail to irq config\n"); 517 - 518 522 for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) 519 523 regulator_unregister(pchip->rdev[icnt]); 520 524 521 525 err_regulator: 522 - dev_err(&client->dev, "fail to initialize regulators\n"); 523 526 /* output disable */ 524 527 for (icnt = 0; icnt < 0x06; icnt++) 525 528 lp8755_write(pchip, icnt, 0x00); 526 529 527 - err_chip_init: 528 - dev_err(&client->dev, "fail to initialize chip\n"); 529 530 return ret; 530 531 } 531 532