Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpib: Fix error code in ibonline()

This accidentally returns 1 on error, but it should return negative
error codes.

Fixes: 9dde4559e939 ("staging: gpib: Add GPIB common core driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aSlMnaT1M104NJb2@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
96118565 327e987e

+2 -3
+2 -3
drivers/gpib/common/iblib.c
··· 227 227 #ifndef CONFIG_NIOS2 228 228 board->autospoll_task = kthread_run(&autospoll_thread, board, 229 229 "gpib%d_autospoll_kthread", board->minor); 230 - retval = IS_ERR(board->autospoll_task); 231 - if (retval) { 230 + if (IS_ERR(board->autospoll_task)) { 232 231 dev_err(board->gpib_dev, "failed to create autospoll thread\n"); 233 232 board->interface->detach(board); 234 - return retval; 233 + return PTR_ERR(board->autospoll_task); 235 234 } 236 235 #endif 237 236 board->online = 1;