From: Dan Carpenter Date: Thu, 15 Aug 2013 05:55:41 +0000 (+0300) Subject: target/pscsi: remove an unneeded check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fdb4c1f399f7632c326b6f5f4283dbd7a3934dbb;p=linux-beck.git target/pscsi: remove an unneeded check blk_get_request() just returns NULL on error, it doesn't return an ERR_PTR. Signed-off-by: Dan Carpenter Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index e992b27aa090..9170b3660318 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -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; }