diff options
author | Harini Katakam <harini.katakam@xilinx.com> | 2021-08-24 15:32:09 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-25 10:39:17 +0100 |
commit | 85520079afce885b80647fbd0d13d8f03d057167 (patch) | |
tree | 09c1278ce7c20983c5f5dc25fe109fc02a53339e /block/bfq-iosched.c | |
parent | 2d26f6e39afb88d32b8f39e76a51b542c3c51674 (diff) |
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>
Diffstat (limited to 'block/bfq-iosched.c')
0 files changed, 0 insertions, 0 deletions