Re: [PATCHv2,2/2] Staging: dgnc: dgnc_driver.c: Add end tag to dgnc_init_module()

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

 



On Mon, Jul 27, 2015 at 04:10:29PM +0800, Navy Cheng wrote:
>  	if (rc < 0)
> -		return rc;
> +		goto end;

Ideally, you should be able to guess from the label name sort of what
the goto does.  Good names are like "goto unregister;" or
"goto err_free_sd;".  "end" is a bad name because it doesn't tell you
what the goto does.

Gotos which do nothing are a waste of time.

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