Skip to content

Commit

Permalink
[SCSI] libosd: Fix unchecked err return found by smatch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Mar 3, 2010
1 parent bb2d3de commit 98e1e0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/scsi/osd/osd_initiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,10 @@ int osd_finalize_request(struct osd_request *or,
cdbh->command_specific_options |= or->attributes_mode;
if (or->attributes_mode == OSD_CDB_GET_ATTR_PAGE_SET_ONE) {
ret = _osd_req_finalize_attr_page(or);
if (ret) {
OSD_DEBUG("_osd_req_finalize_attr_page failed\n");
return ret;
}
} else {
/* TODO: I think that for the GET_ATTR command these 2 should
* be reversed to keep them in execution order (for embeded
Expand Down

0 comments on commit 98e1e0f

Please sign in to comment.