mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
spi: nxp-fspi: Remove error print 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> Link: https://patch.msgid.link/pndqzxqkt8u.a.out@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -1284,7 +1284,7 @@ static int nxp_fspi_probe(struct platform_device *pdev)
|
||||
|
||||
ret = devm_add_action_or_reset(dev, nxp_fspi_cleanup, f);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to register nxp_fspi_cleanup\n");
|
||||
return ret;
|
||||
|
||||
return devm_spi_register_controller(&pdev->dev, ctlr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user