linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFC: fdp: Use signed max_size to catch fail
@ 2019-01-08  7:05 wangbo
  0 siblings, 0 replies; only message in thread
From: wangbo @ 2019-01-08  7:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, linux-wireless, wang.bo116, wangbo

The variable max_size's type is unsigned char,can not catch error number,
change it to signed int.

Signed-off-by: wangbo <wang.bo116@zte.com.cn>
---
 drivers/nfc/fdp/fdp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c
index d5784a4..ba32a59 100644
--- a/drivers/nfc/fdp/fdp.c
+++ b/drivers/nfc/fdp/fdp.c
@@ -192,8 +192,9 @@ static int fdp_nci_send_patch(struct nci_dev *ndev, u8 conn_id, u8 type)
 	const struct firmware *fw;
 	struct sk_buff *skb;
 	unsigned long len;
-	u8 max_size, payload_size;
+	u8  payload_size;
 	int rc = 0;
+	int max_size = 0;
 
 	if ((type == NCI_PATCH_TYPE_OTP && !info->otp_patch) ||
 	    (type == NCI_PATCH_TYPE_RAM && !info->ram_patch))
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-08  7:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08  7:05 [PATCH] NFC: fdp: Use signed max_size to catch fail wangbo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).