]> Git Repo - linux.git/commitdiff
atmel-ssc: fix misuse of dev_dbg when requested ssc instance is not found
authorHans-Christian Egtvedt <[email protected]>
Wed, 4 Feb 2009 23:12:17 +0000 (15:12 -0800)
committerLinus Torvalds <[email protected]>
Thu, 5 Feb 2009 20:56:48 +0000 (12:56 -0800)
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 <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Huang Weiyi <[email protected]>
Acked-by: Haavard Skinnemoen <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/misc/atmel-ssc.c

index bf5e4d065436a2153c76ff13ef6adae2f2604a49..558bf3f2c27698154a6088c43a8daa781577c42b 100644 (file)
@@ -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);
        }
 
This page took 0.06913 seconds and 4 git commands to generate.