mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
NFC: Only warn on SE discovery error
SE discovery errors are currently overwriting the dev_up() return error. This is wrong for many reasons: - We don't want to report an error if we actually brought the device up but it failed to discover SEs. By doing so we pretend we don't have an NFC functional device even we do. The only thing we could not do was checking for SEs availability. This is the false negative case. - In some cases the actual device power up failed but the SE discovery succeeded. Userspace then believes the device is up while it's not. This is the false positive case. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
11bfb1c4b9
commit
a434c24074
@ -133,11 +133,8 @@ int nfc_dev_up(struct nfc_dev *dev)
|
||||
dev->dev_up = true;
|
||||
|
||||
/* We have to enable the device before discovering SEs */
|
||||
if (dev->ops->discover_se) {
|
||||
rc = dev->ops->discover_se(dev);
|
||||
if (rc)
|
||||
pr_warn("SE discovery failed\n");
|
||||
}
|
||||
if (dev->ops->discover_se && dev->ops->discover_se(dev))
|
||||
pr_err("SE discovery failed\n");
|
||||
|
||||
error:
|
||||
device_unlock(&dev->dev);
|
||||
|
Loading…
Reference in New Issue
Block a user