[PATCH] Staging: dgnc: use goto for error handling in dgnc_start()
Dan Carpenter
dan.carpenter at oracle.com
Tue Mar 3 06:47:12 UTC 2015
On Tue, Mar 03, 2015 at 04:55:31AM +0100, Salah Triki wrote:
> The error handling for register_chrdev is taken care by goto statement.
No. Direct returns are more readable. Don't add extra bunny hops for
no reason.
> The failure code from register_chrdev is returned.
>
The test is "if (rc <= 0) {". You maybe want to change it to:
if (rc < 0)
return rc;
regards,
dan carpenter
More information about the devel
mailing list