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

Configure Feed

Select the types of activity you want to include in your feed.

mfd: intel_soc_pmic_bxtwc: Deduplicate error messages

Move the individual error messages inside bxtwc_add_chained_irq_chip()
in order to deduplicate them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20241016105201.757024-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Andy Shevchenko and committed by
Lee Jones
4a8b3d48 3d6b7374

+9 -5
+9 -5
drivers/mfd/intel_soc_pmic_bxtwc.c
··· 435 435 struct regmap_irq_chip_data **data) 436 436 { 437 437 struct device *dev = pmic->dev; 438 - int irq; 438 + int irq, ret; 439 439 440 440 irq = regmap_irq_get_virq(pdata, pirq); 441 441 if (irq < 0) 442 442 return dev_err_probe(dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n", 443 443 pirq, chip->name); 444 444 445 - return devm_regmap_add_irq_chip(dev, pmic->regmap, irq, irq_flags, 0, chip, data); 445 + ret = devm_regmap_add_irq_chip(dev, pmic->regmap, irq, irq_flags, 0, chip, data); 446 + if (ret) 447 + return dev_err_probe(dev, ret, "Failed to add %s IRQ chip\n", chip->name); 448 + 449 + return 0; 446 450 } 447 451 448 452 static int bxtwc_add_chained_devices(struct intel_soc_pmic *pmic, ··· 462 458 463 459 ret = bxtwc_add_chained_irq_chip(pmic, pdata, pirq, irq_flags, chip, data); 464 460 if (ret) 465 - return dev_err_probe(dev, ret, "Failed to add %s IRQ chip\n", chip->name); 461 + return ret; 466 462 467 463 domain = regmap_irq_get_domain(*data); 468 464 ··· 525 521 &bxtwc_regmap_irq_chip_pwrbtn, 526 522 &pmic->irq_chip_data_pwrbtn); 527 523 if (ret) 528 - return dev_err_probe(dev, ret, "Failed to add PWRBTN IRQ chip\n"); 524 + return ret; 529 525 530 526 ret = bxtwc_add_chained_devices(pmic, bxt_wc_bcu_dev, ARRAY_SIZE(bxt_wc_bcu_dev), 531 527 pmic->irq_chip_data, ··· 561 557 &bxtwc_regmap_irq_chip_crit, 562 558 &pmic->irq_chip_data_crit); 563 559 if (ret) 564 - return dev_err_probe(dev, ret, "Failed to add CRIT IRQ chip\n"); 560 + return ret; 565 561 566 562 ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, bxt_wc_dev, ARRAY_SIZE(bxt_wc_dev), 567 563 NULL, 0, NULL);