diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2015-09-29 07:26:05 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-10-30 13:19:44 -0400 |
commit | b158b69a37651b20a0e68f89cf118461e7de4872 (patch) | |
tree | 1f3a793ce241a7d19bb9444c39d9b93bae2d0e1e | |
parent | d8498df1e40e5a232ebe1f1b33edb34887f6a037 (diff) |
mfd: rtsx: Simplify function return logic
The invoked functions already return zero on success or a negative
errno code so there is no need to open code the logic in the caller.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/rts5209.c | 6 | ||||
-rw-r--r-- | drivers/mfd/rts5227.c | 6 | ||||
-rw-r--r-- | drivers/mfd/rts5229.c | 6 | ||||
-rw-r--r-- | drivers/mfd/rts5249.c | 6 | ||||
-rw-r--r-- | drivers/mfd/rtsx_pcr.c | 6 |
5 files changed, 5 insertions, 25 deletions
diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c index 373e253c33df..b95beecf767f 100644 --- a/drivers/mfd/rts5209.c +++ b/drivers/mfd/rts5209.c | |||
@@ -138,11 +138,7 @@ static int rts5209_card_power_on(struct rtsx_pcr *pcr, int card) | |||
138 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pwr_mask, pwr_on); | 138 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pwr_mask, pwr_on); |
139 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, | 139 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, |
140 | LDO3318_PWR_MASK, 0x00); | 140 | LDO3318_PWR_MASK, 0x00); |
141 | err = rtsx_pci_send_cmd(pcr, 100); | 141 | return rtsx_pci_send_cmd(pcr, 100); |
142 | if (err < 0) | ||
143 | return err; | ||
144 | |||
145 | return 0; | ||
146 | } | 142 | } |
147 | 143 | ||
148 | static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card) | 144 | static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card) |
diff --git a/drivers/mfd/rts5227.c b/drivers/mfd/rts5227.c index ce012d78ce2a..c5a65298c781 100644 --- a/drivers/mfd/rts5227.c +++ b/drivers/mfd/rts5227.c | |||
@@ -179,11 +179,7 @@ static int rts5227_card_power_on(struct rtsx_pcr *pcr, int card) | |||
179 | SD_POWER_MASK, SD_POWER_ON); | 179 | SD_POWER_MASK, SD_POWER_ON); |
180 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, | 180 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, |
181 | LDO3318_PWR_MASK, 0x06); | 181 | LDO3318_PWR_MASK, 0x06); |
182 | err = rtsx_pci_send_cmd(pcr, 100); | 182 | return rtsx_pci_send_cmd(pcr, 100); |
183 | if (err < 0) | ||
184 | return err; | ||
185 | |||
186 | return 0; | ||
187 | } | 183 | } |
188 | 184 | ||
189 | static int rts5227_card_power_off(struct rtsx_pcr *pcr, int card) | 185 | static int rts5227_card_power_off(struct rtsx_pcr *pcr, int card) |
diff --git a/drivers/mfd/rts5229.c b/drivers/mfd/rts5229.c index ace45384ec8b..9ed9dc84eac8 100644 --- a/drivers/mfd/rts5229.c +++ b/drivers/mfd/rts5229.c | |||
@@ -129,11 +129,7 @@ static int rts5229_card_power_on(struct rtsx_pcr *pcr, int card) | |||
129 | SD_POWER_MASK, SD_POWER_ON); | 129 | SD_POWER_MASK, SD_POWER_ON); |
130 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, | 130 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, |
131 | LDO3318_PWR_MASK, 0x06); | 131 | LDO3318_PWR_MASK, 0x06); |
132 | err = rtsx_pci_send_cmd(pcr, 100); | 132 | return rtsx_pci_send_cmd(pcr, 100); |
133 | if (err < 0) | ||
134 | return err; | ||
135 | |||
136 | return 0; | ||
137 | } | 133 | } |
138 | 134 | ||
139 | static int rts5229_card_power_off(struct rtsx_pcr *pcr, int card) | 135 | static int rts5229_card_power_off(struct rtsx_pcr *pcr, int card) |
diff --git a/drivers/mfd/rts5249.c b/drivers/mfd/rts5249.c index eb2d5866f719..40f8bb14fc59 100644 --- a/drivers/mfd/rts5249.c +++ b/drivers/mfd/rts5249.c | |||
@@ -234,11 +234,7 @@ static int rtsx_base_card_power_on(struct rtsx_pcr *pcr, int card) | |||
234 | SD_POWER_MASK, SD_VCC_POWER_ON); | 234 | SD_POWER_MASK, SD_VCC_POWER_ON); |
235 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, | 235 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, |
236 | LDO3318_PWR_MASK, 0x06); | 236 | LDO3318_PWR_MASK, 0x06); |
237 | err = rtsx_pci_send_cmd(pcr, 100); | 237 | return rtsx_pci_send_cmd(pcr, 100); |
238 | if (err < 0) | ||
239 | return err; | ||
240 | |||
241 | return 0; | ||
242 | } | 238 | } |
243 | 239 | ||
244 | static int rtsx_base_card_power_off(struct rtsx_pcr *pcr, int card) | 240 | static int rtsx_base_card_power_off(struct rtsx_pcr *pcr, int card) |
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index a66540a49079..b98cf1de0a55 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c | |||
@@ -571,11 +571,7 @@ static int rtsx_pci_set_pull_ctl(struct rtsx_pcr *pcr, const u32 *tbl) | |||
571 | tbl++; | 571 | tbl++; |
572 | } | 572 | } |
573 | 573 | ||
574 | err = rtsx_pci_send_cmd(pcr, 100); | 574 | return rtsx_pci_send_cmd(pcr, 100); |
575 | if (err < 0) | ||
576 | return err; | ||
577 | |||
578 | return 0; | ||
579 | } | 575 | } |
580 | 576 | ||
581 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card) | 577 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card) |