diff options
author | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-02-04 18:12:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-05 15:56:48 -0500 |
commit | dfecb7164eb81fbfae93fee1ad1da2ac58bb224d (patch) | |
tree | 44dc3ffe7d75ab73417f561f12914137bef8c1aa /drivers/misc | |
parent | ab92661d5d9514647346047f30f67a7f35ffea67 (diff) |
atmel-ssc: fix misuse of dev_dbg when requested ssc instance is not found
The ssc pointer is not valid when the id is not found in the list.
Convert the message from a debug one into an error message and avoid
dereferencing the bad pointer.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/atmel-ssc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index bf5e4d065436..558bf3f2c276 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
@@ -35,7 +35,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num) | |||
35 | 35 | ||
36 | if (!ssc_valid) { | 36 | if (!ssc_valid) { |
37 | spin_unlock(&user_lock); | 37 | spin_unlock(&user_lock); |
38 | dev_dbg(&ssc->pdev->dev, "could not find requested device\n"); | 38 | pr_err("ssc: ssc%d platform device is missing\n", ssc_num); |
39 | return ERR_PTR(-ENODEV); | 39 | return ERR_PTR(-ENODEV); |
40 | } | 40 | } |
41 | 41 | ||