summaryrefslogtreecommitdiff
path: root/drivers/block/paride
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/paride')
-rw-r--r--drivers/block/paride/pd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index fea7e76a00de..ca831f741d89 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -722,6 +722,8 @@ static int pd_special_command(struct pd_unit *disk,
int err = 0;
rq = blk_get_request(disk->gd->queue, READ, __GFP_WAIT);
+ if (!rq)
+ return -ENODEV;
rq->cmd_type = REQ_TYPE_SPECIAL;
rq->special = func;