From: Boaz Harrosh Date: Fri, 19 Feb 2010 19:46:24 +0000 (-0800) Subject: [SCSI] libosd: Fix unchecked err return found by smatch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98e1e0f07c3f1820b8ac424569ee9e9916d3665b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley --- 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, 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