[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181225083334.68473-1-kjlu@umn.edu>
Date: Tue, 25 Dec 2018 02:33:32 -0600
From: Kangjie Lu <kjlu@....edu>
To: kjlu@....edu
Cc: pakki001@....edu, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
Aymen Qader <qader.aymen@...il.com>,
Colin Ian King <colin.king@...onical.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] rts5208: fix a missing check of the status of sd_init_power
sd_init_power() could fail. The fix inserts a check of its status. If it
fails, returns STATUS_FAIL.
Signed-off-by: Kangjie Lu <kjlu@....edu>
---
drivers/staging/rts5208/sd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index ff1a9aa152ce..8c3fd885a4f3 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -2352,7 +2352,9 @@ static int reset_sd(struct rtsx_chip *chip)
break;
}
- sd_init_power(chip);
+ retval = sd_init_power(chip);
+ if (retval != STATUS_SUCCESS)
+ goto status_fail;
sd_dummy_clock(chip);
}
--
2.17.2 (Apple Git-113)
Powered by blists - more mailing lists