[SCSI] scsi_lib.c: use BUILD_BUG_ON
[deliverable/linux.git] / drivers / scsi / scsi_lib.c
index 71084728eb42322462af7a6f0980d627af54e725..d2c02df12fdcb8b6b072a7a7e57500b21263a3d6 100644 (file)
@@ -426,7 +426,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
 free_req:
        blk_put_request(req);
 free_sense:
-       kfree(sioc);
+       kmem_cache_free(scsi_io_context_cache, sioc);
        return DRIVER_ERROR << 24;
 }
 EXPORT_SYMBOL_GPL(scsi_execute_async);
@@ -1084,7 +1084,7 @@ static void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd)
 {
        struct request *req = cmd->request;
 
-       BUG_ON(sizeof(req->cmd) > sizeof(cmd->cmnd));
+       BUILD_BUG_ON(sizeof(req->cmd) > sizeof(cmd->cmnd));
        memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd));
        cmd->cmd_len = req->cmd_len;
        if (!req->data_len)
This page took 0.023662 seconds and 5 git commands to generate.