summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cpia2/cpia2_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/cpia2/cpia2_usb.c')
-rw-r--r--drivers/media/usb/cpia2/cpia2_usb.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c
index 37f9b30b0abc..1c7e16e5d88b 100644
--- a/drivers/media/usb/cpia2/cpia2_usb.c
+++ b/drivers/media/usb/cpia2/cpia2_usb.c
@@ -20,10 +20,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
* Stripped of 2.4 stuff ready for main kernel submit by
* Alan Cox <alan@lxorguk.ukuu.org.uk>
****************************************************************************/
@@ -551,12 +547,10 @@ static int write_packet(struct usb_device *udev,
if (!registers || size <= 0)
return -EINVAL;
- buf = kmalloc(size, GFP_KERNEL);
+ buf = kmemdup(registers, size, GFP_KERNEL);
if (!buf)
return -ENOMEM;
- memcpy(buf, registers, size);
-
ret = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0),
request,