diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6295f1dc1..a38442c27 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8709,7 +8709,7 @@ static struct request *blk_map_kern_sg(struct request_queue *q, bw = blk_copy_kern_sg(q, sgl, nents, gfp, reading); if (IS_ERR(bw)) { - rq = ERR_PTR(PTR_ERR(bw)); + rq = ERR_CAST(bw); goto out; }