[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1538169927-26267-1-git-send-email-khoroshilov@ispras.ru>
Date: Sat, 29 Sep 2018 00:25:27 +0300
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jacob Feder <jacobsfeder@...il.com>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: [PATCH] staging: axis-fifo: add error handling of class_create()
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
---
drivers/staging/axis-fifo/axis-fifo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index abeee0ecc122..63c8efd1b8db 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -1089,6 +1089,8 @@ static int __init axis_fifo_init(void)
pr_info("axis-fifo driver loaded with parameters read_timeout = %i, write_timeout = %i\n",
read_timeout, write_timeout);
axis_fifo_driver_class = class_create(THIS_MODULE, DRIVER_NAME);
+ if (IS_ERR(axis_fifo_driver_class))
+ return PTR_ERR(axis_fifo_driver_class);
return platform_driver_register(&axis_fifo_driver);
}
--
2.7.4
Powered by blists - more mailing lists