mmc: via-sdmmc: remove unneeded variable 'ret'
PATCH 1/1 mmc: via-sdmmc: remove unneeded variable 'ret'
Fix the following coccicheck warning:
./drivers/mmc/host/via-sdmmc.c:1274:5-8: Unneeded variable: "ret". Return "0" on line 1295
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- drivers/mmc/host/via-sdmmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/host/via-sdmmc.c +1 -2
@@ -1271,7 +1271,6 @@ static int __maybe_unused via_sd_suspend(struct device *dev)static int __maybe_unused via_sd_resume (struct device *dev) {struct via_crdr_mmc_host *sdhost; -int ret =0 ;u8 gatt; sdhost =dev_get_drvdata (dev);
@@ -1292,7 +1291,7 @@ static int __maybe_unused via_sd_resume(struct device *dev)via_restore_pcictrlreg (sdhost);via_init_sdc_pm (sdhost); -return ret; +return 0 ; } static SIMPLE_DEV_PM_OPS(via_sd_pm_ops, via_sd_suspend, via_sd_resume);
Signature · 1 line
1.8.3.1
Quoted 7 lines · Yang Li
Fix the following coccicheck warning:
./drivers/mmc/host/via-sdmmc.c:1274:5-8: Unneeded variable: "ret". Return "0" on line 1295Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 28 lines
--- drivers/mmc/host/via-sdmmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mmc/host/via-sdmmc.c +1
-3@@ -1271,7 +1271,6 @@ static int __maybe_unused via_sd_suspend(struct device *dev)static int __maybe_unused via_sd_resume (struct device *dev) {struct via_crdr_mmc_host *sdhost; -int ret =0 ;u8 gatt; sdhost =dev_get_drvdata (dev);@@ -1292,7 +1291,7 @@ static int __maybe_unused via_sd_resume(struct device *dev)via_restore_pcictrlreg (sdhost);via_init_sdc_pm (sdhost); -return ret; +return 0 ; } static SIMPLE_DEV_PM_OPS(via_sd_pm_ops, via_sd_suspend, via_sd_resume); --1.8.3.1