]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
esas2r: fix an oversight in setting return value
authorTomas Henzl <thenzl@redhat.com>
Sun, 16 Nov 2014 13:35:34 +0000 (14:35 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 Nov 2014 14:42:52 +0000 (15:42 +0100)
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>
drivers/scsi/esas2r/esas2r_ioctl.c

index c88b9f9491b5e1c949f7d59fb2a540837f713df7..baf913047b488d43cef1bf04afd9e3e6e5697329 100644 (file)
@@ -1524,9 +1524,12 @@ ioctl_done:
                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 */