diff options
| author | Johannes Thumshirn <jthumshirn@suse.de> | 2017-07-17 15:11:42 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-22 09:23:32 +0100 |
| commit | db259b6768cf52ae1c0c92b7fc6e093a28969d71 (patch) | |
| tree | a6eb75e38f92c4dd60a79fa38c91bae633164681 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 6d85835042a7f94b0ccc02d0103bd2000ebe25f6 (diff) | |
scsi: sg: fix static checker warning in sg_is_valid_dxfer
commit 14074aba4bcda3764c9a702b276308b89901d5b6 upstream.
dxfer_len is an unsigned int and we always assign a value > 0 to it, so
it doesn't make any sense to check if it is < 0. We can't really check
dxferp as well as we have both NULL and not NULL cases in the possible
call paths.
So just return true for SG_DXFER_FROM_DEV transfer in
sg_is_valid_dxfer().
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reported-by: Colin Ian King <colin.king@canonical.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
