Skip to contentSkip to conversation

mmc: host: sdhci-esdhc-imx: remove unused code

PATCH In review [email protected] 3 participants 3 messages Aug 24, 2020 – Aug 28, 2020

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 mmc: host: sdhci-esdhc-imx: remove unused code

From: Haibo Chen <[email protected]>

Value assigned to a variable(err) is never used, so remove it

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -3
index 3d6eaf490d4a..3d2615eb7d56 100644
@@ -1673,10 +1673,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 		goto disable_ipg_clk;
 
 	imx_data->pinctrl = devm_pinctrl_get(&pdev->dev);
-	if (IS_ERR(imx_data->pinctrl)) {
-		err = PTR_ERR(imx_data->pinctrl);
+	if (IS_ERR(imx_data->pinctrl))
 		dev_warn(mmc_dev(host->mmc), "could not get pinctrl\n");
-	}
 
 	if (esdhc_is_usdhc(imx_data)) {
 		host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
Signature · 1 line
2.17.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On 24/08/20 1:45 pm, [email protected] wrote:

From: Haibo Chen <[email protected]>

Value assigned to a variable(err) is never used, so remove it

Quoted 21 lines
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -3
index 3d6eaf490d4a..3d2615eb7d56 100644
@@ -1673,10 +1673,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 		goto disable_ipg_clk;
 
 	imx_data->pinctrl = devm_pinctrl_get(&pdev->dev);
-	if (IS_ERR(imx_data->pinctrl)) {
-		err = PTR_ERR(imx_data->pinctrl);
+	if (IS_ERR(imx_data->pinctrl))
 		dev_warn(mmc_dev(host->mmc), "could not get pinctrl\n");
-	}
 
 	if (esdhc_is_usdhc(imx_data)) {
 		host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
#2 lore raw
In reply to [email protected]
Quoted 6 lines · On Mon, 24 Aug 2020 at 12:51, <[email protected]> wrote:

From: Haibo Chen <[email protected]>

Value assigned to a variable(err) is never used, so remove it

Applied for next, thanks!

Kind regards
Uffe

Quoted 23 lines
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -4
index 3d6eaf490d4a..3d2615eb7d56 100644
@@ -1673,10 +1673,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
                goto disable_ipg_clk;
 
        imx_data->pinctrl = devm_pinctrl_get(&pdev->dev);
-       if (IS_ERR(imx_data->pinctrl)) {
-               err = PTR_ERR(imx_data->pinctrl);
+       if (IS_ERR(imx_data->pinctrl))
                dev_warn(mmc_dev(host->mmc), "could not get pinctrl\n");
-       }
 
        if (esdhc_is_usdhc(imx_data)) {
                host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
--

2.17.1