From 31bc23241b54b23fb880db6f5e16a443ab44e5d0 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Mon, 5 Dec 2022 10:01:38 +0100 Subject: [PATCH] s390/raw3270: fix nullpointer check Fix the following checkpatch warning: CHECK: Comparison to NULL could be written "!rp" + if (rp == NULL) Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens --- drivers/s390/char/raw3270.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 0724a1ab117a..09d7570d3b7d 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c @@ -1232,7 +1232,7 @@ static void raw3270_remove(struct ccw_device *cdev) * devices even if they haven't been varied online. * Thus, rp may validly be NULL here. */ - if (rp == NULL) + if (!rp) return; sysfs_remove_group(&cdev->dev.kobj, &raw3270_attr_group);