mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-05 10:17:58 -05:00
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 <[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]>
This commit is contained in:
parent
ab92661d5d
commit
dfecb7164e
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue