scsi: target: fix unsigned comparision with less than zero
authorColin Ian King <colin.king@canonical.com>
Wed, 20 Mar 2019 16:37:09 +0000 (16:37 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 21 Mar 2019 00:33:06 +0000 (20:33 -0400)
commitee26724af6c71a9db786c5809395b4853edd4d54
tree74b430776e0e9c61150fa98358e68f2b0a6a7eab
parent1943edacef8966e24fc66d8cbe6347fe8b10ff80
scsi: target: fix unsigned comparision with less than zero

Currently an error return is being assigned to an unsigned size_t varianle
and then checked if the result is less than zero which will always be
false.  Fix this by making ret ssize_t rather than a size_t.

Fixes: 0322913cab79 ("scsi: target: Add device product id and revision configfs attributes")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_configfs.c