]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: bfin_spi: Remove unnecessary test for bus and pins[bus]
authorAxel Lin <axel.lin@ingics.com>
Mon, 2 Dec 2013 04:57:33 +0000 (12:57 +0800)
committerSonic Zhang <sonic.zhang@analog.com>
Fri, 6 Dec 2013 08:06:51 +0000 (16:06 +0800)
commit727cbe14b25b492bc9b96ad9d1f5f881d833028e
tree447918578ff843a942c4053229c0e3e033c1969a
parente5cb60a033502ab24fef15fa005835b2e46f90eb
spi: bfin_spi: Remove unnecessary test for bus and pins[bus]

For invalid bus number, current code returns NULL in the default case of
switch-case statements. In additional, pins[bus] is always not NULL because
it is the address of specific row of the two-dimensional array.
Thus this patch removes these unnecessary test.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
drivers/spi/bfin_spi.c