[PATCH 3/7] i2c: scx200_acb - refactor and simplify code

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

 



Hi Ben,

> scx200_acb refactor/simplify code (no functional changes).

> +		dev_dbg(&iface->adapter.dev, "negative ack in state %s\n",
> (...)
> -	dev_dbg(&iface->adapter.dev, "negative acknowledge in state %s\n",

Functional change, you changed the debug message ;)

>  	if (!iface) {
>  		printk(KERN_ERR NAME ": can't allocate memory\n");
> -		rc = -ENOMEM;
> -		goto errout;
> +		return -ENOMEM;
>  	}

Some people seem to prefer single exit point, so you could preserve the
errout label right before the trailing return, and keep that code.

-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux