From: Jesper Juhl Date: Thu, 1 Mar 2012 22:01:19 +0000 (+0100) Subject: Allocate correct size (portably) in drivers/usb/gadget/f_midi.c::f_midi_bind() X-Git-Tag: v3.4-rc1~184^2~22^2~28 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a5be8783e0016d15e7907ddd212b2c312e196eb;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed