The patch below fixes occurrences of the following recently introduced

checkpatch warning: "do not use assignment in if condition".

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

with some fixes



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-09-07 12:09:16 +00:00
parent 103f8bb8ec
commit 95032dca33
2 changed files with 7 additions and 3 deletions

View File

@@ -2100,7 +2100,8 @@ static void scst_req_done(struct scsi_cmnd *scsi_cmd)
TRACE_ENTRY();
if (scsi_cmd && (req = scsi_cmd->sc_request)) {
if (scsi_cmd) {
req = scsi_cmd->sc_request;
if (req) {
if (req->sr_bufflen)
kfree(req->sr_buffer);

View File

@@ -1255,8 +1255,11 @@ static inline struct scst_cmd *scst_get_cmd(struct scsi_cmnd *scsi_cmd,
{
struct scst_cmd *cmd = NULL;
if (scsi_cmd && (*req = scsi_cmd->sc_request))
cmd = (struct scst_cmd *)(*req)->upper_private_data;
if (scsi_cmd) {
*req = scsi_cmd->sc_request;
if (*req)
cmd = (struct scst_cmd *)(*req)->upper_private_data;
}
if (cmd == NULL) {
PRINT_ERROR("%s", "Request with NULL cmd");