Commit 4b58e063 authored by Waqar Hameed's avatar Waqar Hameed Committed by Greg Kroah-Hartman
Browse files

usb: misc: eud: 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: default avatarWaqar Hameed <waqar.hameed@axis.com>
Reviewed-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/pndo6sukt8u.a.out@axis.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b12daf36
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -193,8 +193,7 @@ static int eud_probe(struct platform_device *pdev)

	ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip);
	if (ret)
		return dev_err_probe(chip->dev, ret,
				"failed to add role switch release action\n");
		return ret;

	chip->base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(chip->base))