]> git.baikalelectronics.ru Git - kernel.git/commit
atm: uPD98402: fix incorrect allocation
authorTong Zhang <ztong0001@gmail.com>
Mon, 8 Mar 2021 03:25:29 +0000 (22:25 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Mar 2021 23:16:30 +0000 (15:16 -0800)
commita881032a91b81c090fba695fd145665cb2df70d9
treeb93f0677a75b2d9b63d906caa61ee62b4817cf97
parentf4e621f1578ac3b88db55c761adc09277c07dc5f
atm: uPD98402: fix incorrect allocation

dev->dev_data is set in zatm.c, calling zatm_start() will overwrite this
dev->dev_data in uPD98402_start() and a subsequent PRIV(dev)->lock
(i.e dev->phy_data->lock) will result in a null-ptr-dereference.

I believe this is a typo and what it actually want to do is to allocate
phy_data instead of dev_data.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/uPD98402.c