File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -440,10 +440,10 @@ static inline int __iommu_copy_struct_from_user(
440
440
void * dst_data , const struct iommu_user_data * src_data ,
441
441
unsigned int data_type , size_t data_len , size_t min_len )
442
442
{
443
- if (src_data -> type != data_type )
444
- return - EINVAL ;
445
443
if (WARN_ON (!dst_data || !src_data ))
446
444
return - EINVAL ;
445
+ if (src_data -> type != data_type )
446
+ return - EINVAL ;
447
447
if (src_data -> len < min_len || data_len < src_data -> len )
448
448
return - EINVAL ;
449
449
return copy_struct_from_user (dst_data , data_len , src_data -> uptr ,
@@ -456,8 +456,8 @@ static inline int __iommu_copy_struct_from_user(
456
456
* include/uapi/linux/iommufd.h
457
457
* @user_data: Pointer to a struct iommu_user_data for user space data info
458
458
* @data_type: The data type of the @kdst. Must match with @user_data->type
459
- * @min_last: The last memember of the data structure @kdst points in the
460
- * initial version.
459
+ * @min_last: The last member of the data structure @kdst points in the initial
460
+ * version.
461
461
* Return 0 for success, otherwise -error.
462
462
*/
463
463
#define iommu_copy_struct_from_user (kdst , user_data , data_type , min_last ) \
You can’t perform that action at this time.
0 commit comments