Browse Source

owl-loader: fix crash caused by endian patch

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 <[email protected]>
Tested-by: Vitalij Alshevsky <[email protected]>
Fixes: ddece08bf456 ("kernel: owl-loader: fix sparse endian warnings")
Signed-off-by: Christian Lamparter <[email protected]>
Christian Lamparter 6 years ago
parent
commit
457de5a154
1 changed files with 1 additions and 1 deletions
  1. 1 1
      target/linux/generic/files/drivers/misc/owl-loader.c

+ 1 - 1
target/linux/generic/files/drivers/misc/owl-loader.c

@@ -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;