On Fri, Jul 13, 2018 at 10:58:11PM -0700, Todd Poynor wrote: > From: Todd Poynor <toddpoynor@xxxxxxxxxx> > > Remove unnecessary variable. > > Bail out if no physical device. > > Signed-off-by: Todd Poynor <toddpoynor@xxxxxxxxxx> > --- > drivers/staging/gasket/gasket_core.c | 19 ++++++------------- > 1 file changed, 6 insertions(+), 13 deletions(-) > > diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c > index 65aa7cf454fb..f7d8f66e8746 100644 > --- a/drivers/staging/gasket/gasket_core.c > +++ b/drivers/staging/gasket/gasket_core.c > @@ -915,8 +915,6 @@ static int gasket_enable_dev( > { > int tbl_idx; > int ret; > - bool has_dma_ops; > - struct device *ddev; > const struct gasket_driver_desc *driver_desc = > internal_desc->driver_desc; > > @@ -934,26 +932,21 @@ static int gasket_enable_dev( > return ret; > } > > - has_dma_ops = true; > + if (!gasket_dev->pci_dev) { > + gasket_log_error(gasket_dev, > + "%s: no physical device", __func__); > + return -ENODEV; > + } How can this ever be true? I don't see where this can be removed to enable this error check to be hit. What am I missing? thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel