summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/urb.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-03-01 23:01:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-02 16:22:11 -0800
commit2a5be8783e0016d15e7907ddd212b2c312e196eb (patch)
tree400f52423b5fbd7d94f7bbe4925a4a59103e96eb /drivers/usb/core/urb.c
parentb1443ac0e486842c133b8805ee035ab3ff918763 (diff)
downloadblackbird-op-linux-2a5be8783e0016d15e7907ddd212b2c312e196eb.tar.gz
blackbird-op-linux-2a5be8783e0016d15e7907ddd212b2c312e196eb.zip
Allocate correct size (portably) in drivers/usb/gadget/f_midi.c::f_midi_bind()
As the coverity checker puts it: "Passing argument "sizeof (midi_function) /*8*/" to function "kcalloc" and then casting the return value to "struct usb_descriptor_header **" is suspicious. ... In this particular case sizeof(struct usb_descriptor_header **) happens to be equal to sizeof(struct usb_descriptor_header *), but this is not a portable assumption." I believe we really do intend to use 'sizeof(*midi_function)' here, so this patch makes that change. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/urb.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud