Skip to content

Commit

Permalink
target/pscsi: remove an unneeded check
Browse files Browse the repository at this point in the history
blk_get_request() just returns NULL on error, it doesn't return an
ERR_PTR.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
  • Loading branch information
Dan Carpenter authored and Nicholas Bellinger committed Sep 9, 2013
1 parent 988e3a8 commit fdb4c1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/target/target_core_pscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,8 @@ pscsi_execute_cmd(struct se_cmd *cmd)
req = blk_get_request(pdv->pdv_sd->request_queue,
(data_direction == DMA_TO_DEVICE),
GFP_KERNEL);
if (!req || IS_ERR(req)) {
pr_err("PSCSI: blk_get_request() failed: %ld\n",
req ? IS_ERR(req) : -ENOMEM);
if (!req) {
pr_err("PSCSI: blk_get_request() failed\n");
ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
goto fail;
}
Expand Down

0 comments on commit fdb4c1f

Please sign in to comment.