Commit b158b69a authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Lee Jones

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: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent d8498df1
No related merge requests found
...@@ -138,11 +138,7 @@ static int rts5209_card_power_on(struct rtsx_pcr *pcr, int card) ...@@ -138,11 +138,7 @@ static int rts5209_card_power_on(struct rtsx_pcr *pcr, int card)
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pwr_mask, pwr_on); rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pwr_mask, pwr_on);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL,
LDO3318_PWR_MASK, 0x00); LDO3318_PWR_MASK, 0x00);
err = rtsx_pci_send_cmd(pcr, 100); return rtsx_pci_send_cmd(pcr, 100);
if (err < 0)
return err;
return 0;
} }
static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card) static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card)
......
...@@ -179,11 +179,7 @@ static int rts5227_card_power_on(struct rtsx_pcr *pcr, int card) ...@@ -179,11 +179,7 @@ static int rts5227_card_power_on(struct rtsx_pcr *pcr, int card)
SD_POWER_MASK, SD_POWER_ON); SD_POWER_MASK, SD_POWER_ON);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL,
LDO3318_PWR_MASK, 0x06); LDO3318_PWR_MASK, 0x06);
err = rtsx_pci_send_cmd(pcr, 100); return rtsx_pci_send_cmd(pcr, 100);
if (err < 0)
return err;
return 0;
} }
static int rts5227_card_power_off(struct rtsx_pcr *pcr, int card) static int rts5227_card_power_off(struct rtsx_pcr *pcr, int card)
......
...@@ -129,11 +129,7 @@ static int rts5229_card_power_on(struct rtsx_pcr *pcr, int card) ...@@ -129,11 +129,7 @@ static int rts5229_card_power_on(struct rtsx_pcr *pcr, int card)
SD_POWER_MASK, SD_POWER_ON); SD_POWER_MASK, SD_POWER_ON);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL,
LDO3318_PWR_MASK, 0x06); LDO3318_PWR_MASK, 0x06);
err = rtsx_pci_send_cmd(pcr, 100); return rtsx_pci_send_cmd(pcr, 100);
if (err < 0)
return err;
return 0;
} }
static int rts5229_card_power_off(struct rtsx_pcr *pcr, int card) static int rts5229_card_power_off(struct rtsx_pcr *pcr, int card)
......
...@@ -234,11 +234,7 @@ static int rtsx_base_card_power_on(struct rtsx_pcr *pcr, int card) ...@@ -234,11 +234,7 @@ static int rtsx_base_card_power_on(struct rtsx_pcr *pcr, int card)
SD_POWER_MASK, SD_VCC_POWER_ON); SD_POWER_MASK, SD_VCC_POWER_ON);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL,
LDO3318_PWR_MASK, 0x06); LDO3318_PWR_MASK, 0x06);
err = rtsx_pci_send_cmd(pcr, 100); return rtsx_pci_send_cmd(pcr, 100);
if (err < 0)
return err;
return 0;
} }
static int rtsx_base_card_power_off(struct rtsx_pcr *pcr, int card) static int rtsx_base_card_power_off(struct rtsx_pcr *pcr, int card)
......
...@@ -571,11 +571,7 @@ static int rtsx_pci_set_pull_ctl(struct rtsx_pcr *pcr, const u32 *tbl) ...@@ -571,11 +571,7 @@ static int rtsx_pci_set_pull_ctl(struct rtsx_pcr *pcr, const u32 *tbl)
tbl++; tbl++;
} }
err = rtsx_pci_send_cmd(pcr, 100); return rtsx_pci_send_cmd(pcr, 100);
if (err < 0)
return err;
return 0;
} }
int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card) int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment