WSL2-Linux-Kernel/drivers/net
Zhang Changzhong cc6596fc72 net: ll_temac: Fix potential NULL dereference in temac_probe()
platform_get_resource() may fail and in this case a NULL dereference
will occur.

Fix it to use devm_platform_ioremap_resource() instead of calling
platform_get_resource() and devm_ioremap().

This is detected by Coccinelle semantic patch.

@@
expression pdev, res, n, t, e, e1, e2;
@@

res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t, n);
+ if (!res)
+   return -EINVAL;
... when != res == NULL
e = devm_ioremap(e1, res->start, e2);

Fixes: 8425c41d1e ("net: ll_temac: Extend support to non-device-tree platforms")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-12-08 16:15:46 -08:00
..
appletalk docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
arcnet
bonding bonding: fix feature flag setting at init time 2020-12-08 11:26:08 -08:00
caif
can can: softing: softing_netdev_open(): fix error handling 2020-12-05 13:08:11 -08:00
dsa net: mscc: ocelot: fix dropping of unknown IPv4 multicast on Seville 2020-12-05 15:41:34 -08:00
ethernet net: ll_temac: Fix potential NULL dereference in temac_probe() 2020-12-08 16:15:46 -08:00
fddi
fjes
hamradio drivers: net: hamradio: fix document location 2020-10-15 07:49:47 +02:00
hippi
hyperv hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
ieee802154
ipa net: ipa: pass the correct size when freeing DMA memory 2020-12-04 14:38:44 -08:00
ipvlan
mdio
netdevsim netdevsim: set .owner to THIS_MODULE 2020-11-17 14:08:59 -08:00
pcs net: pcs-xpcs: depend on MDIO_BUS instead of selecting it 2020-10-16 16:54:11 -07:00
phy net: phy: smsc: add missed clk_disable_unprepare in smsc_phy_probe() 2020-11-14 11:21:13 -08:00
plip
ppp
slip
team
usb usbnet: ipheth: fix connectivity with iOS 14 2020-11-21 14:01:34 -08:00
vmxnet3
wan cosa: Add missing kfree in error path of cosa_write 2020-11-11 17:52:01 -08:00
wimax
wireguard
wireless rtw88: debug: Fix uninitialized memory in debugfs code 2020-12-03 18:00:45 +02:00
xen-netback xen/netback: use lateeoi irq binding 2020-10-20 10:22:03 +02:00
Kconfig
LICENSE.SRC
Makefile
Space.c
bareudp.c
dummy.c
eql.c
geneve.c geneve: pull IP header before ECN decapsulation 2020-12-01 17:47:23 -08:00
gtp.c gtp: fix an use-before-init in gtp_newlink() 2020-10-29 09:43:21 -07:00
ifb.c
loopback.c
macsec.c net: macsec: use new function dev_fetch_sw_netstats 2020-10-13 17:33:48 -07:00
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: honor IOCB_NOWAIT flag 2020-11-21 15:19:08 -08:00
veth.c
virtio_net.c Revert "virtio-net: ethtool configurable RXCSUM" 2020-10-21 20:33:19 -07:00
vrf.c vrf: packets with lladdr src needs dst at input with orig_iif when needs strict 2020-12-05 13:46:07 -08:00
vsockmon.c
vxlan.c vxlan: fix error return code in __vxlan_dev_create() 2020-12-02 18:04:02 -08:00
xen-netfront.c