]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mscc: ptp: fix a smatch error
authorAntoine Tenart <antoine.tenart@bootlin.com>
Thu, 25 Jun 2020 15:42:06 +0000 (17:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:22:11 +0000 (16:22 -0700)
commit5fe3b81cb05a5e0bcf17cbc2a654487302206ad2
tree0808ff4aa5828aa71f98c9a5e04db526dec9fcf7
parent8f4525330b0d94c752a272019d303f7e3745be4d
net: phy: mscc: ptp: fix a smatch error

The following error was reported by smatch:
vsc85xx_ts_read_csr() error: uninitialized symbol 'blk_hw'.

In practice this is very unlikely, as all the block identifiers given to
this functions are handled and described in an enum. The smatch error is
fixed by doing what is already done in vsc85xx_ts_write_csr: using the
"PROCESSOR" block by default.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mscc/mscc_ptp.c