Unverified Commit 83c2126a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents caa1ae20 f64c63c0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -894,6 +894,11 @@ static int nci_activate_target(struct nfc_dev *nfc_dev,
		return -EINVAL;
	}

	if (protocol >= NFC_PROTO_MAX) {
		pr_err("the requested nfc protocol is invalid\n");
		return -EINVAL;
	}

	if (!(nci_target->supported_protocols & (1 << protocol))) {
		pr_err("target does not support the requested protocol 0x%x\n",
		       protocol);