Commit e2f00f0b authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

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: default avatarGuenter Roeck <groeck@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 99ccddf5
...@@ -2026,9 +2026,7 @@ const struct gasket_driver_desc *gasket_get_driver_desc(struct gasket_dev *dev) ...@@ -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) struct device *gasket_get_device(struct gasket_dev *dev)
{ {
if (dev->pci_dev) return &dev->pci_dev->dev;
return &dev->pci_dev->dev;
return NULL;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment