spcom: avoid false error message on spcom_device_release()
Typically, spcom device nodes are associated with a glink channel. However, /dev/spcom and /dev/sp_ssr have other purposes, and they are not associated with a channel. Avoid error message when user call file close() for /dev/spcom and /dev/sp_ssr. Change-Id: I5dd55ad3c7ff93efb2e332fcab49b58cbc177c90 Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
This commit is contained in:
parent
2e45ea7281
commit
1b18025150
1 changed files with 11 additions and 1 deletions
|
@ -1920,10 +1920,20 @@ static int spcom_device_release(struct inode *inode, struct file *filp)
|
|||
|
||||
pr_debug("Close file [%s].\n", name);
|
||||
|
||||
if (strcmp(name, DEVICE_NAME) == 0) {
|
||||
pr_debug("root dir skipped.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(name, "sp_ssr") == 0) {
|
||||
pr_debug("sp_ssr dev node skipped.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ch = filp->private_data;
|
||||
|
||||
if (!ch) {
|
||||
pr_err("ch is NULL, file name %s.\n", file_to_filename(filp));
|
||||
pr_debug("ch is NULL, file name %s.\n", file_to_filename(filp));
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue