public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rts5208: fix a missing check of the status of sd_init_power
@ 2018-12-25  8:33 Kangjie Lu
  2019-01-02 10:28 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Kangjie Lu @ 2018-12-25  8:33 UTC (permalink / raw)
  To: kjlu
  Cc: pakki001, Greg Kroah-Hartman, Arnd Bergmann, Aymen Qader,
	Colin Ian King, devel, linux-kernel

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@umn.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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-02 10:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-25  8:33 [PATCH] rts5208: fix a missing check of the status of sd_init_power Kangjie Lu
2019-01-02 10:28 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox