diff options
| author | Waqar Hameed <waqar.hameed@axis.com> | 2025-08-05 11:33:34 +0200 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2025-10-01 10:28:19 +0100 |
| commit | 99767a0c8bb4e206f6cea37f5162073d1899168c (patch) | |
| tree | ab52214fb6ab4f84ac81c6d7fa56320827c93cf1 /drivers/mfd | |
| parent | mfd: da9063: Split chip variant reading in two bus transactions (diff) | |
| download | linux-99767a0c8bb4e206f6cea37f5162073d1899168c.tar.gz linux-99767a0c8bb4e206f6cea37f5162073d1899168c.zip | |
mfd: macsmc: Remove error prints for devm_add_action_or_reset()
When `devm_add_action_or_reset()` fails, it is due to a failed memory
allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do
anything when error is `-ENOMEM`. Therefore, remove the useless call to
`dev_err_probe()` when `devm_add_action_or_reset()` fails, and just
return the value instead.
Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Reviewed-by: Sven Peter <sven@kernel.org>
Link: https://lore.kernel.org/r/pnd8qjym7td.a.out@axis.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
| -rw-r--r-- | drivers/mfd/macsmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/macsmc.c b/drivers/mfd/macsmc.c index 870c8b2028a8..c8575c9c9f4b 100644 --- a/drivers/mfd/macsmc.c +++ b/drivers/mfd/macsmc.c @@ -429,7 +429,7 @@ static int apple_smc_probe(struct platform_device *pdev) ret = devm_add_action_or_reset(dev, apple_smc_rtkit_shutdown, smc); if (ret) - return dev_err_probe(dev, ret, "Failed to register rtkit shutdown action"); + return ret; ret = apple_rtkit_start_ep(smc->rtk, SMC_ENDPOINT); if (ret) @@ -465,7 +465,7 @@ static int apple_smc_probe(struct platform_device *pdev) apple_smc_write_flag(smc, SMC_KEY(NTAP), true); ret = devm_add_action_or_reset(dev, apple_smc_disable_notifications, smc); if (ret) - return dev_err_probe(dev, ret, "Failed to register notification disable action"); + return ret; ret = devm_mfd_add_devices(smc->dev, PLATFORM_DEVID_NONE, apple_smc_devs, ARRAY_SIZE(apple_smc_devs), |
