mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
staging: axis-fifo: add error handling of class_create()
Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
869d3acd48
commit
a24b420bb3
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue