Instead of just returning for each switch condition use a break.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
void __user *arg, struct libcfs_ioctl_hdr *hdr)
{
struct libcfs_ioctl_data *data = NULL;
- int err = -EINVAL;
+ int err = 0;
/*
* The libcfs_ioctl_data_adjust() function performs adjustment
switch (cmd) {
case IOC_LIBCFS_CLEAR_DEBUG:
libcfs_debug_clear_buffer();
- return 0;
+ break;
/*
* case IOC_LIBCFS_PANIC:
* Handled in arch/cfs_module.c
data->ioc_inlbuf1[data->ioc_inllen1 - 1] != '\0')
return -EINVAL;
libcfs_debug_mark_buffer(data->ioc_inlbuf1);
- return 0;
+ break;
default: {
struct libcfs_ioctl_handler *hand;
}
}
up_read(&ioctl_list_sem);
- break;
- }
+ break; }
}
return err;