mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
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:
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user