Don't deref dev->dev_private before checking that it exists.
Found with: Coverity Prevent(tm) CID: 2940 MFC after: 3 days
This commit is contained in:
parent
f05da0e980
commit
363fec5d16
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190163
@ -46,9 +46,8 @@ static drm_pci_id_list_t i915_pciidlist[] = {
|
||||
static int i915_suspend(device_t kdev)
|
||||
{
|
||||
struct drm_device *dev = device_get_softc(kdev);
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
if (!dev || !dev_priv) {
|
||||
if (!dev || !dev->dev_private) {
|
||||
DRM_ERROR("dev: 0x%lx, dev_priv: 0x%lx\n",
|
||||
(unsigned long) dev, (unsigned long) dev_priv);
|
||||
DRM_ERROR("DRM not initialized, aborting suspend.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user