]> git.ipfire.org Git - people/arne_f/kernel.git/commit
atm: uPD98402: fix incorrect allocation
authorTong Zhang <ztong0001@gmail.com>
Mon, 8 Mar 2021 03:25:29 +0000 (22:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:41:39 +0000 (14:41 +0200)
commitb7c445361734b398f2595ed09ad98ce0437e37e2
tree0274fd7ef222b47a411fe8eb878ca7a12d29f360
parentef822bd0d8701a1a901153ec0c8605e4b79101c3
atm: uPD98402: fix incorrect allocation

[ Upstream commit 3153724fc084d8ef640c611f269ddfb576d1dcb1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/atm/uPD98402.c