Commit dfecb716 authored by Hans-Christian Egtvedt's avatar Hans-Christian Egtvedt Committed by Linus Torvalds
Browse files

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: default avatarHans-Christian Egtvedt <>
Cc: Kay Sievers <>
Cc: Huang Weiyi <>
Acked-by: default avatarHaavard Skinnemoen <>
Cc: David Brownell <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ab92661d
......@@ -35,7 +35,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
if (!ssc_valid) {
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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment