mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
Merge tag 'ieee802154-for-net-2022-01-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2022-01-05 Below I have a last minute fix for the atusb driver. Pavel fixes a KASAN uninit report for the driver. This version is the minimal impact fix to ease backporting. A bigger rework of the driver to avoid potential similar problems is ongoing and will come through net-next when ready. * tag 'ieee802154-for-net-2022-01-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan: ieee802154: atusb: fix uninit value in atusb_set_extended_addr ==================== Link: https://lore.kernel.org/r/20220105153914.512305-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
af872b6919
1 changed files with 6 additions and 4 deletions
|
@ -93,7 +93,9 @@ static int atusb_control_msg(struct atusb *atusb, unsigned int pipe,
|
||||||
|
|
||||||
ret = usb_control_msg(usb_dev, pipe, request, requesttype,
|
ret = usb_control_msg(usb_dev, pipe, request, requesttype,
|
||||||
value, index, data, size, timeout);
|
value, index, data, size, timeout);
|
||||||
if (ret < 0) {
|
if (ret < size) {
|
||||||
|
ret = ret < 0 ? ret : -ENODATA;
|
||||||
|
|
||||||
atusb->err = ret;
|
atusb->err = ret;
|
||||||
dev_err(&usb_dev->dev,
|
dev_err(&usb_dev->dev,
|
||||||
"%s: req 0x%02x val 0x%x idx 0x%x, error %d\n",
|
"%s: req 0x%02x val 0x%x idx 0x%x, error %d\n",
|
||||||
|
@ -861,9 +863,9 @@ static int atusb_get_and_show_build(struct atusb *atusb)
|
||||||
if (!build)
|
if (!build)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0),
|
/* We cannot call atusb_control_msg() here, since this request may read various length data */
|
||||||
ATUSB_BUILD, ATUSB_REQ_FROM_DEV, 0, 0,
|
ret = usb_control_msg(atusb->usb_dev, usb_rcvctrlpipe(usb_dev, 0), ATUSB_BUILD,
|
||||||
build, ATUSB_BUILD_SIZE, 1000);
|
ATUSB_REQ_FROM_DEV, 0, 0, build, ATUSB_BUILD_SIZE, 1000);
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
build[ret] = 0;
|
build[ret] = 0;
|
||||||
dev_info(&usb_dev->dev, "Firmware: build %s\n", build);
|
dev_info(&usb_dev->dev, "Firmware: build %s\n", build);
|
||||||
|
|
Loading…
Reference in a new issue