media: em28xx-cards: fix em28xx_duplicate_dev()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 8 Mar 2018 09:31:00 +0000 (04:31 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 8 Mar 2018 11:06:51 +0000 (06:06 -0500)
There is a double sizeof() typo here so we don't duplicate the struct
properly.

Fixes: be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
drivers/media/usb/em28xx/em28xx-cards.c

index 6e8247849c4f523f9a37629e049b992d146e008f..6e0e67d2387633cf2f1b62aacf832f6416b55b9c 100644 (file)
@@ -3515,7 +3515,7 @@ static int em28xx_duplicate_dev(struct em28xx *dev)
                dev->dev_next = NULL;
                return -ENOMEM;
        }
-       memcpy(sec_dev, dev, sizeof(sizeof(*sec_dev)));
+       memcpy(sec_dev, dev, sizeof(*sec_dev));
        /* Check to see next free device and mark as used */
        do {
                nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);