]> git.baikalelectronics.ru Git - kernel.git/commit
caif: cleanup: remove duplicate checks
authorDan Carpenter <error27@gmail.com>
Mon, 24 May 2010 06:29:34 +0000 (06:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 May 2010 07:24:16 +0000 (00:24 -0700)
commit010eb6e06fa6b5f348f2c4c1cd949497274ecb44
treefff58796c91f08e987132b4e12c128c2b03fbe3a
parent8e999fc7acb4a45266321fcb211e61974fd11d4c
caif: cleanup: remove duplicate checks

"phyinfo" can never be null here because we assigned it an address, so I
removed both the assert and the second check inside the if statement.  I
removed the "phyinfo->phy_layer != NULL" check as well because that was
asserted earlier.

Walter Harms suggested I move the "phyinfo->phy_ref_count++;" outside
the if condition for readability, so I have done that.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfcnfg.c