]> git.baikalelectronics.ru Git - kernel.git/commit
USB: storage: karma: fix rio_karma_init return
authorLin Ma <linma@zju.edu.cn>
Tue, 12 Apr 2022 14:43:59 +0000 (22:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 17:03:26 +0000 (19:03 +0200)
commitf95551187a77161839be0190a4ccf44ce390d950
treec97a55fd9d189a6ac31a1c0107d8dbef17ba2932
parent98ff41063241784d6fbdbef9316974eef2cb073d
USB: storage: karma: fix rio_karma_init return

The function rio_karam_init() should return -ENOMEM instead of
value 0 (USB_STOR_TRANSPORT_GOOD) when allocation fails.

Similarly, it should return -EIO when rio_karma_send_command() fails.

Fixes: 06f56c6f5e3a ("USB Storage: add rio karma eject support")
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Link: https://lore.kernel.org/r/20220412144359.28447-1-linma@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/karma.c