From: Kyungmin Park <kyungmin.park@samsung.com>
To: tony@atomide.com
Cc: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP: Check the get_cover_state function pointer if not set
Date: Thu, 29 Nov 2007 17:01:11 +0900 [thread overview]
Message-ID: <20071129080111.GA879@party> (raw)
If the get_cover_state is not set, it occurs the oops.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index cf9d31c..d7ecece 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -238,7 +238,9 @@ static void mmc_omap_release_slot(struct mmc_omap_slot *slot)
static inline
int mmc_omap_cover_is_open(struct mmc_omap_slot *slot)
{
- return slot->pdata->get_cover_state(mmc_dev(slot->mmc), slot->id);
+ if (slot->pdata->get_cover_state)
+ return slot->pdata->get_cover_state(mmc_dev(slot->mmc), slot->id);
+ return 0;
}
static ssize_t
next reply other threads:[~2007-11-29 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 8:01 Kyungmin Park [this message]
2007-12-01 0:06 ` [PATCH] ARM: OMAP: Check the get_cover_state function pointer if not set Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071129080111.GA879@party \
--to=kyungmin.park@samsung.com \
--cc=linux-omap-open-source@linux.omap.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.