Re: [PATCH] Staging: dgnc: use goto for error handling in dgnc_start()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux