[PATCH] s390/dasd: convert to use ERR_CAST()

zhang.enpei@zte.com.cn posted 1 patch 1 month, 2 weeks ago
drivers/s390/block/dasd_devmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] s390/dasd: convert to use ERR_CAST()
Posted by zhang.enpei@zte.com.cn 1 month, 2 weeks ago
From: Zhang Enpei <zhang.enpei@zte.com.cn>

Use ERR_CAST() since the macro clearly indicates that this is a pointer
to an error value and a type conversion was performed.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
---
 drivers/s390/block/dasd_devmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index ddbdf1f85d44..0f4900d246e8 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -555,7 +555,7 @@ dasd_create_device(struct ccw_device *cdev)
 
        devmap = dasd_devmap_from_cdev(cdev);
        if (IS_ERR(devmap))
-               return (void *) devmap;
+               return ERR_CAST(devmap);
 
        device = dasd_alloc_device();
        if (IS_ERR(device))
-- 
2.25.1