owl-loader: fix crash caused by endian patch
authorChristian Lamparter <chunkeey@gmail.com>
Wed, 6 Mar 2019 16:53:27 +0000 (17:53 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Wed, 6 Mar 2019 21:02:56 +0000 (22:02 +0100)
This patch fixes a crash that occured on the
BT Home Hub v5a (lantiq/xrx200) which resulted
in the device bootlooping.

Reported-by: Ryan Mounce <ryan@mounce.com.au>
Tested-by: Vitalij Alshevsky <v_alshevsky@tut.by>
Fixes: ddece08bf456 ("kernel: owl-loader: fix sparse endian warnings")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/generic/files/drivers/misc/owl-loader.c

index 5cbee79740dd6c898d51da95dc25c3d71fe65531..a4e55ad7b199b164f260aca6f4d3bec157911c70 100644 (file)
@@ -75,7 +75,7 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
 
        /* set pointer to first reg address */
        for (data = (const void *) (cal_data + 3);
-            (const void *) data <= cal_end && data->reg != ~0;
+            (const void *) data <= cal_end && data->reg != (u16)~0;
             data++) {
                u32 val;
                u16 reg;