lkml.org 
[lkml]   [2016]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: drivers/bluetooth/dtl1_cs.c:559: bad if statement ?
From
Date
Hi David,

> drivers/bluetooth/dtl1_cs.c:559:32: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
>
> Source code is
>
> if ((p_dev->resource[1]->end) || (p_dev->resource[1]->end < 8))
> return -ENODEV;
>
> Maybe better code
>
> if ((p_dev->resource[1]->end < 0) || (p_dev->resource[1]->end >= 8))
> return -ENODEV;

mind sending a patch?

Regards

Marcel

\
 
 \ /
  Last update: 2016-11-22 22:50    [W:0.023 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site