Skip to content

Commit

Permalink
esas2r: fix an oversight in setting return value
Browse files Browse the repository at this point in the history
The patch moves an error code assigment to a 'default' case
in the previous switch statement.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Tomas Henzl authored and Christoph Hellwig committed Nov 25, 2014
1 parent ba9e587 commit 68b14b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/scsi/esas2r/esas2r_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,12 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)
case -EINVAL:
ioctl->header.return_code = IOCTL_INVALID_PARAM;
break;

default:
ioctl->header.return_code = IOCTL_GENERAL_ERROR;
break;
}

ioctl->header.return_code = IOCTL_GENERAL_ERROR;
}

/* Always copy the buffer back, if only to pick up the status */
Expand Down

0 comments on commit 68b14b8

Please sign in to comment.