From a9121491ccfdec7e1f7058d45bee73d87388f681 Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Mon, 8 Jan 2007 18:26:03 +0000 Subject: [PATCH] Add a check to verify ATA driver has been initialised in ata_sleepnow(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11949 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/ata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 1491d2376e..4e41ef2b1f 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -610,7 +610,7 @@ void ata_sleep(void) void ata_sleepnow(void) { - if (!spinup && !sleeping && !ata_mtx.locked) + if (!spinup && !sleeping && !ata_mtx.locked && initialized) { call_ata_idle_notifys(false); ata_perform_sleep();