Skip to contentSkip to conversation

ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron...

DISCUSSION Johannes Berg 1 participant 1 message May 18, 2018 USB

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Arend van Spriel

Review

Quoted 5 lines
(quoted diff) +4 -0
+	buffer = kmalloc(sizeof(cmd), GFP_KERNEL);
+	if (!buffer)
+		return -ENOMEM;
+	memcpy(buffer, cmd, sizeof(cmd));

It should also use kmemdup() ;-)

johannes
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html