aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/machxo2-spi.c
diff options
context:
space:
mode:
authorZhen Lei <[email protected]>2021-05-28 16:26:14 +0800
committerGreg Kroah-Hartman <[email protected]>2021-06-04 15:27:26 +0200
commitce52ec5beecc1079c251f60e3973b3758f60eb59 (patch)
tree14ef3e9cfdc2296b3a6d2049eb856876f5bc188f /drivers/fpga/machxo2-spi.c
parentcc196fed0394aa03ec75e22274edb18c8b03ad00 (diff)
visorbus: fix error return code in visorchipset_init()
Commit 1366a3db3dcf ("staging: unisys: visorbus: visorchipset_init clean up gotos") assigns the initial value -ENODEV to the local variable 'err', and the first several error branches will return this value after "goto error". But commit f1f537c2e7f5 ("staging: unisys: visorbus: Consolidate controlvm channel creation.") overwrites 'err' in the middle of the way. As a result, some error branches do not successfully return the initial value -ENODEV of 'err', but return 0. In addition, when kzalloc() fails, -ENOMEM should be returned instead of -ENODEV. Fixes: f1f537c2e7f5 ("staging: unisys: visorbus: Consolidate controlvm channel creation.") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/machxo2-spi.c')
0 files changed, 0 insertions, 0 deletions