Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

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

 



On Mon, 19 Jan 2015, 敬锐 wrote:

> 
> On 01/18/2015 08:20 PM, Lee Jones wrote:
> >> +static int rts524a_optimize_phy(struct rtsx_pcr *pcr)
> >> >+{
> >> >+	int err;
> >> >+
> >> >+	err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3,
> >> >+		D3_DELINK_MODE_EN, 0x00);
> >> >+	if (err < 0)
> >> >+		return err;
> > if (err)
> >
> err value will never be positive, but I have to make it consistence
> with driver in other place, because all the check using if (err < 0) form.

Then all of them should be changed.

> And maybe, it make reserved for future the function may return positive
> value.

I'd prefer not to live in the world of 'what if'.  I think only
checking for a less than zero error value insinuates that a greater
than zero return is acceptable, but in this case is it not.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
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