V4L/DVB (7971): usb: unaligned
authorAl Viro <viro@ftp.linux.org.uk>
Wed, 21 May 2008 03:33:01 +0000 (00:33 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 5 Jun 2008 09:35:53 +0000 (06:35 -0300)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-usb/dvb-usb-firmware.c

index e1112e3..733a7ff 100644 (file)
@@ -127,7 +127,7 @@ int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
        if ((*pos + hx->len + 4) >= fw->size)
                return -EINVAL;
 
-       hx->addr = le16_to_cpu( *((u16 *) &b[1]) );
+       hx->addr = b[1] | (b[2] << 8);
        hx->type = b[3];
 
        if (hx->type == 0x04) {