HomeFreeBSD

Linux: Cleanup unnecessary NULL check in __vdev_disk_physio()

Description

Linux: Cleanup unnecessary NULL check in __vdev_disk_physio()

zio is never NULL when given to the vdev. Coverity complained saying:

"Either the check against null is unnecessary, or there may be a null
pointer dereference."

Reported-by: Coverity (CID-1466174)
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14263

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Dec 4 2022, 9:46 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 8 2022, 9:52 PM
Parents
rG56c6f293c05a: Remove duplicate statically allocated variable
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGf1100863f74f: Linux: Cleanup unnecessary NULL check in __vdev_disk_physio() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Dec 8 2022, 9:52 PM