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.

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: Waqar Hameed <waqar.hameed@axis.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/pndo6sukt8u.a.out@axis.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Waqar Hameed and committed by
Greg Kroah-Hartman
4b58e063 b12daf36

+1 -2
+1 -2
drivers/usb/misc/qcom_eud.c
··· 193 193 194 194 ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip); 195 195 if (ret) 196 - return dev_err_probe(chip->dev, ret, 197 - "failed to add role switch release action\n"); 196 + return ret; 198 197 199 198 chip->base = devm_platform_ioremap_resource(pdev, 0); 200 199 if (IS_ERR(chip->base))