Skip to content
Commit 3265a7e6 authored by Andreas Hecht's avatar Andreas Hecht Committed by Wolfram Sang
Browse files

i2c: dev: Add __user annotation



Fix Sparse warnings:
drivers/i2c/i2c-dev.c:546:19: warning: incorrect type in assignment (different address spaces)
drivers/i2c/i2c-dev.c:549:53: warning: incorrect type in argument 2 (different address spaces)

compat_ptr() returns a pointer tagged __user which gets assigned to a
pointer missing the __user annotation. The same pointer is passed to
copy_from_user() as an argument where it is expected to have the __user
annotation. Fix both by adding the __user annotation to the pointer.

Fixes: 7d5cb456 ("i2c compat ioctls: move to ->compat_ioctl()")
Signed-off-by: default avatarAndreas Hecht <andreas.e.hecht@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 22695837
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment