Commit a24b420b authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Greg Kroah-Hartman
Browse files

staging: axis-fifo: add error handling of class_create()



Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 869d3acd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}