Skip to content

Commit 3370139

Browse files
zenczykowskigregkh
authored andcommitted
USB: f_ncm: ncm_bitrate (speed) is unsigned
[ 190.544755] configfs-gadget gadget: notify speed -44967296 This is because 4250000000 - 2**32 is -44967296. Fixes: 9f6ce42 ("usb: gadget: f_ncm.c added") Cc: Brooke Basile <[email protected]> Cc: Bryan O'Donoghue <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Lorenzo Colitti <[email protected]> Cc: Yauheni Kaliuta <[email protected]> Cc: Linux USB Mailing List <[email protected]> Acked-By: Lorenzo Colitti <[email protected]> Signed-off-by: Maciej Żenczykowski <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 40d9e03 commit 3370139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/function/f_ncm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static void ncm_do_notify(struct f_ncm *ncm)
583583
data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget));
584584
data[1] = data[0];
585585

586-
DBG(cdev, "notify speed %d\n", ncm_bitrate(cdev->gadget));
586+
DBG(cdev, "notify speed %u\n", ncm_bitrate(cdev->gadget));
587587
ncm->notify_state = NCM_NOTIFY_CONNECT;
588588
break;
589589
}

0 commit comments

Comments
 (0)