diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-07-21 06:35:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-24 13:56:46 +0200 |
commit | e2f00f0b9876387e38849e7b1338ac684a7a6562 (patch) | |
tree | de2cf47edb5edba3ee3e2cb4f644d9e94a1886bd /drivers/staging/gasket/gasket_core.c | |
parent | 99ccddf5af6f32f501e719024e5e699565c6552e (diff) |
staging: gasket: gasket_get_device drop check for NULL pci_dev
The pci_dev field of a struct gasket_dev can never be NULL, there's no
need to check for this in gasket_get_device().
Reported-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket/gasket_core.c')
-rw-r--r-- | drivers/staging/gasket/gasket_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index e82f8ce39c9f..8265d543623d 100644 --- a/drivers/staging/gasket/gasket_core.c +++ b/drivers/staging/gasket/gasket_core.c @@ -2026,9 +2026,7 @@ const struct gasket_driver_desc *gasket_get_driver_desc(struct gasket_dev *dev) */ struct device *gasket_get_device(struct gasket_dev *dev) { - if (dev->pci_dev) - return &dev->pci_dev->dev; - return NULL; + return &dev->pci_dev->dev; } /** |