diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2010-02-19 14:46:24 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-03 10:42:21 -0500 |
commit | 98e1e0f07c3f1820b8ac424569ee9e9916d3665b (patch) | |
tree | 70ccee35002cdc3093f8a2892f29df19ab93330a | |
parent | bb2d3de1885cd69a5fc92af99c4e0c05eb5fc122 (diff) |
[SCSI] libosd: Fix unchecked err return found by smatch
Doing CHECK="smatch --two-passes gives:
drivers/scsi/osd/osd_initiator.c +1435 osd_finalize_request warning: assignment to 'ret' was never used
Which is an unchecked possible allocation failure, Fixed.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 24223473f573..60de85091502 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c | |||
@@ -1433,6 +1433,10 @@ int osd_finalize_request(struct osd_request *or, | |||
1433 | cdbh->command_specific_options |= or->attributes_mode; | 1433 | cdbh->command_specific_options |= or->attributes_mode; |
1434 | if (or->attributes_mode == OSD_CDB_GET_ATTR_PAGE_SET_ONE) { | 1434 | if (or->attributes_mode == OSD_CDB_GET_ATTR_PAGE_SET_ONE) { |
1435 | ret = _osd_req_finalize_attr_page(or); | 1435 | ret = _osd_req_finalize_attr_page(or); |
1436 | if (ret) { | ||
1437 | OSD_DEBUG("_osd_req_finalize_attr_page failed\n"); | ||
1438 | return ret; | ||
1439 | } | ||
1436 | } else { | 1440 | } else { |
1437 | /* TODO: I think that for the GET_ATTR command these 2 should | 1441 | /* TODO: I think that for the GET_ATTR command these 2 should |
1438 | * be reversed to keep them in execution order (for embeded | 1442 | * be reversed to keep them in execution order (for embeded |