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 e1112e39fb638e4d9731510afd7a22667ba434ea..733a7ff7b207819bcd05f2a816388fa21e9f69b5 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) {