mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
can: avoids a false warning
At this point optlen == sizeof(sfilter) but some compilers are dumb. Reported-by: Németh Márton <[email protected] Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Oliver Hartkopp <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
dac876193c
commit
4ffa87012e
1 changed files with 1 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
|||
return -EFAULT;
|
||||
}
|
||||
} else if (count == 1) {
|
||||
if (copy_from_user(&sfilter, optval, optlen))
|
||||
if (copy_from_user(&sfilter, optval, sizeof(sfilter)))
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue