[PATCH -next] rtc: stmp3xxx: Add failure handling for stmp3xxx_wdt_register()

Wolfram Sang wsa at kernel.org
Wed Sep 14 16:02:23 PDT 2022


> +		if (rc)
> +			platform_device_put(wdt_pdev);

This is correct, thanks.

> +	} else {
> +		dev_err(&rtc_pdev->dev,
> +			"failed to allocate stmp3xxx_rtc_wdt\n");

This is superfluous because rc is initialized to -1.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220915/d0355a05/attachment.sig>


More information about the linux-arm-kernel mailing list