summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 02:15:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:42 -0700
commit0bc11fd446d2ca29459c3c8e04a6d36db9bbbea4 (patch)
tree3464f1e029a877be3f998da7c5542617d77b324a /drivers
parent62b0559aad5cba060568cb962e4bbb111ec73a14 (diff)
downloadop-kernel-dev-0bc11fd446d2ca29459c3c8e04a6d36db9bbbea4.zip
op-kernel-dev-0bc11fd446d2ca29459c3c8e04a6d36db9bbbea4.tar.gz
PNP: skip dev->protocol NULL checks
Every PNP device should have a valid protocol pointer. If it doesn't, something's wrong and we should oops so we can find and fix the problem. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Adrian Bunk <bunk@kernel.org> Cc: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pnp/driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 12a1645..e85cbf1 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -167,7 +167,7 @@ static int pnp_bus_suspend(struct device *dev, pm_message_t state)
return error;
}
- if (pnp_dev->protocol && pnp_dev->protocol->suspend)
+ if (pnp_dev->protocol->suspend)
pnp_dev->protocol->suspend(pnp_dev, state);
return 0;
}
@@ -181,7 +181,7 @@ static int pnp_bus_resume(struct device *dev)
if (!pnp_drv)
return 0;
- if (pnp_dev->protocol && pnp_dev->protocol->resume)
+ if (pnp_dev->protocol->resume)
pnp_dev->protocol->resume(pnp_dev);
if (pnp_can_write(pnp_dev)) {
OpenPOWER on IntegriCloud