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: 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>

authored by

Waqar Hameed and committed by
Lee Jones
99767a0c 9ac4890a

+2 -2
+2 -2
drivers/mfd/macsmc.c
··· 429 429 430 430 ret = devm_add_action_or_reset(dev, apple_smc_rtkit_shutdown, smc); 431 431 if (ret) 432 - return dev_err_probe(dev, ret, "Failed to register rtkit shutdown action"); 432 + return ret; 433 433 434 434 ret = apple_rtkit_start_ep(smc->rtk, SMC_ENDPOINT); 435 435 if (ret) ··· 465 465 apple_smc_write_flag(smc, SMC_KEY(NTAP), true); 466 466 ret = devm_add_action_or_reset(dev, apple_smc_disable_notifications, smc); 467 467 if (ret) 468 - return dev_err_probe(dev, ret, "Failed to register notification disable action"); 468 + return ret; 469 469 470 470 ret = devm_mfd_add_devices(smc->dev, PLATFORM_DEVID_NONE, 471 471 apple_smc_devs, ARRAY_SIZE(apple_smc_devs),