On Tue, May 05, 2015 at 06:36:01PM -0400, Benjamin Romer wrote:
> From: Don Zickus <dzic...@redhat.com>
> +     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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to