summaryrefslogtreecommitdiff
path: root/drivers/ptp
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2020-04-24 16:03:48 +0800
committerDavid S. Miller <davem@davemloft.net>2020-04-24 16:59:21 -0700
commit6033cebdfff9b10192eb254e8cc60fedd595ea7f (patch)
tree37bc88123a2c0841552559f92e22afb4171a29e7 /drivers/ptp
parent5d7163a117876f95f44f6f9fb9f028daead42243 (diff)
ptp: idt82p33: remove unnecessary comparison
The type of loaddr is u8 which is always '<=' 0xff, so the loaddr <= 0xff is always true, we can remove this comparison. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp')
-rw-r--r--drivers/ptp/ptp_idt82p33.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ptp_idt82p33.c
index 31ea811b6d5f..179f6c472e50 100644
--- a/drivers/ptp/ptp_idt82p33.c
+++ b/drivers/ptp/ptp_idt82p33.c
@@ -881,7 +881,7 @@ static int idt82p33_load_firmware(struct idt82p33 *idt82p33)
/* Page size 128, last 4 bytes of page skipped */
if (((loaddr > 0x7b) && (loaddr <= 0x7f))
- || ((loaddr > 0xfb) && (loaddr <= 0xff)))
+ || loaddr > 0xfb)
continue;
err = idt82p33_write(idt82p33, _ADDR(page, loaddr),