Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB: drivers/media/dvb/siano: Remove double test

The same expression is tested twice and the result is the same each time.

The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@expression@
expression E;
@@

(
* E
|| ... || E
|
* E
&& ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Julia Lawall and committed by
Mauro Carvalho Chehab
f78729b4 6b81bef8

+1 -2
+1 -2
drivers/media/dvb/siano/smscoreapi.c
··· 1504 1504 u32 msgData[3]; /* keep it 3 ! */ 1505 1505 } *pMsg; 1506 1506 1507 - if ((NewLevel > 1) || (PinNum > MAX_GPIO_PIN_NUMBER) || 1508 - (PinNum > MAX_GPIO_PIN_NUMBER)) 1507 + if ((NewLevel > 1) || (PinNum > MAX_GPIO_PIN_NUMBER)) 1509 1508 return -EINVAL; 1510 1509 1511 1510 totalLen = sizeof(struct SmsMsgHdr_ST) +