Re: [PATCH 1/2] mfd: rtsx: fix PM suspend for 5227

2014-09-12 Thread micky
On 09/12/2014 04:36 PM, Dan Carpenter wrote: You've updated them all to be "if (err < 0)" how is that different from "if (err)"? What I'm saying is that could you reply to the question? I guess I normally prefer "if (err)" over "if (err < 0)" but I don't know if it makes a difference here? Hi

Re: [PATCH 1/2] mfd: rtsx: fix PM suspend for 5227

2014-09-12 Thread Dan Carpenter
On Thu, Sep 11, 2014 at 10:42:49AM +0300, Dan Carpenter wrote: > On Thu, Sep 11, 2014 at 03:17:52PM +0800, micky_ch...@realsil.com.cn wrote: > > + err = pci_read_config_byte(pcr->pci, addr, &val); > > + if (err) > > + return err; > > Some of these check for "if (err) " and some check

Re: [PATCH 1/2] mfd: rtsx: fix PM suspend for 5227

2014-09-11 Thread Dan Carpenter
On Thu, Sep 11, 2014 at 03:17:52PM +0800, micky_ch...@realsil.com.cn wrote: > + /* reset PM_CTRL3 before send buffer cmd */ > + err = rtsx_pci_write_register(pcr, PM_CTRL3, 0x10, 0x00); > + if (err < 0) > + return err; > + > + return err; Just do: return rtsx_pc

[PATCH 1/2] mfd: rtsx: fix PM suspend for 5227

2014-09-11 Thread micky_ching
From: Micky Ching Fix rts5227 failed send buffer cmd after suspend, PM_CTRL3 should reset before send any buffer cmd after suspend. Otherwise, buffer cmd will failed, this will lead resume fail. Signed-off-by: Micky Ching --- drivers/mfd/rts5227.c| 23 +++ include