ieee802154: atusb: move to new USB API
authorPavel Skripkin <paskripkin@gmail.com>
Sat, 8 Jan 2022 13:18:38 +0000 (16:18 +0300)
committerStefan Schmidt <stefan@datenfreihafen.org>
Mon, 10 Jan 2022 08:05:18 +0000 (09:05 +0100)
commit416abf4f1891de423cfcc437d4089a1a59c0adf0
tree764ec5fa82c8812e12c7edc8f335b7c725544ef5
parent8aaaf2f3af2ae212428f4db1af34214225f5cec3
ieee802154: atusb: move to new USB API

Old USB API is prone to uninit value bugs if error handling is not
correct. Let's move atusb to use new USB API to

1) Make code more simple, since new API does not require memory
   to be allocates via kmalloc()

2) Defend driver from usb-related uninit value bugs.

3) Make code more modern and simple

This patch removes atusb usb wrappers as Greg suggested [0], this will make
code more obvious and easier to understand over time, and replaces old
API calls with new ones.

Also this patch adds and updates usb related error handling to prevent
possible uninit value bugs in future

Link: https://lore.kernel.org/all/YdL0GPxy4TdGDzOO@kroah.com/
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
drivers/net/ieee802154/atusb.c