checkpatch.pl false positive? "ERROR: do not use assignment in ifcondition"

From: Tilman Schmidt
Date: Tue Oct 20 2009 - 11:51:11 EST


The command
./scripts/checkpatch.pl -f drivers/isdn/gigaset/bas-gigaset.c
produces a lot of "ERROR" messages like these:

ERROR: do not use assignment in if condition
#608: FILE: isdn/gigaset/bas-gigaset.c:608:
+ if ((ret = usb_submit_urb(ucs->urb_cmd_in, GFP_ATOMIC)) != 0) {

ERROR: do not use assignment in if condition
#745: FILE: isdn/gigaset/bas-gigaset.c:745:
+ if ((ucs->rcvbuf = kmalloc(l, GFP_ATOMIC)) == NULL) {

ERROR: do not use assignment in if condition
#753: FILE: isdn/gigaset/bas-gigaset.c:753:
+ if ((rc = atread_submit(cs, BAS_TIMEOUT)) < 0) {

As far as I can see there's nothing wrong with these lines. In particular,
I cannot find anything in Documentation/CodingStyle that would prohibit an
assignment inside an 'if' condition.

PS: I know the file has other problems. That's why I'm trying to
checkpatch it in the first place.

--
Tilman Schmidt E-Mail: tilman@xxxxxxx
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

Attachment: signature.asc
Description: OpenPGP digital signature