> -----Original Message----- > From: Stephen Hemminger <[email protected]> > Sent: Tuesday, January 25, 2022 1:46 AM > To: [email protected] > Cc: Stephen Hemminger <[email protected]>; Maxime Coquelin > <[email protected]>; Xia, Chenbo <[email protected]> > Subject: [PATCH v2 10/83] examples/vhost_blk: remove unnecessary NULL checks > > Remove redundant NULL pointer checks before free functions > found by nullfree.cocci > > Signed-off-by: Stephen Hemminger <[email protected]> > --- > examples/vhost_blk/vhost_blk.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c > index feadacc62ee5..2cab1e6994fe 100644 > --- a/examples/vhost_blk/vhost_blk.c > +++ b/examples/vhost_blk/vhost_blk.c > @@ -849,8 +849,7 @@ static void > vhost_blk_ctrlr_destroy(struct vhost_blk_ctrlr *ctrlr) > { > if (ctrlr->bdev != NULL) { > - if (ctrlr->bdev->data != NULL) > - rte_free(ctrlr->bdev->data); > + rte_free(ctrlr->bdev->data); > > rte_free(ctrlr->bdev); > } > -- > 2.30.2
Reviewed-by: Chenbo Xia <[email protected]>

