Re: [PATCH 024/141] staging: unisys: Move visorchannel into visorbus

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

 



On Tue, May 05, 2015 at 06:36:01PM -0400, Benjamin Romer wrote:
> From: Don Zickus <dzickus@xxxxxxxxxx>
> +	rc = p;
> +cleanup:
> +
> +	if (!rc) {
> +		if (!p) {
> +			visorchannel_destroy(p);
> +			p = NULL;
> +		}
> +	}
> +	return rc;
> +}

Ho ho ho.  More one err bugs.  In this case there was no reason to mix
the error and the success path.

	return p;

err_destroy:
	visorchannel_destroy(p);
	return NULL;

No confusing nested if statements.

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