From dfecb7164eb81fbfae93fee1ad1da2ac58bb224d Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Wed, 4 Feb 2009 15:12:17 -0800 Subject: 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 Cc: Kay Sievers Cc: Huang Weiyi Acked-by: Haavard Skinnemoen Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/misc/atmel-ssc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc/atmel-ssc.c') diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index bf5e4d0..558bf3f 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) if (!ssc_valid) { spin_unlock(&user_lock); - dev_dbg(&ssc->pdev->dev, "could not find requested device\n"); + pr_err("ssc: ssc%d platform device is missing\n", ssc_num); return ERR_PTR(-ENODEV); } -- cgit v1.1