linux/drivers/net/ethernet/cadence
Harini Katakam 85520079af net: macb: Add a NULL check on desc_ptp
macb_ptp_desc will not return NULL under most circumstances with correct
Kconfig and IP design config register. But for the sake of the extreme
corner case, check for NULL when using the helper. In case of rx_tstamp,
no action is necessary except to return (similar to timestamp disabled)
and warn. In case of TX, return -EINVAL to let the skb be free. Perform
this check before marking skb in progress.
Fixes coverity warning:
(4) Event dereference:
Dereferencing a null pointer "desc_ptp"

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25 10:39:17 +01:00
..
Kconfig ethernet: select CONFIG_CRC32 as needed 2020-12-04 14:42:21 -08:00
macb_main.c net: macb: Use devm_platform_get_and_ioremap_resource() 2021-06-07 14:07:22 -07:00
macb_pci.c net: cadence: Demote non-compliant kernel-doc headers 2021-05-17 14:12:38 -07:00
macb_ptp.c net: macb: Add a NULL check on desc_ptp 2021-08-25 10:39:17 +01:00
macb.h net: macb: Disable PCS auto-negotiation for SGMII fixed-link mode 2021-03-12 16:44:45 -08:00
Makefile