handle.c: rework pointer assignment logic
authorDaniel Mack <daniel@zonque.org>
Fri, 31 Oct 2014 11:05:02 +0000 (12:05 +0100)
committerDaniel Mack <daniel@zonque.org>
Fri, 31 Oct 2014 11:08:52 +0000 (12:08 +0100)
commit15d38a48f68b6a30e35b94fa66d0974569aaaece
treed56273535c815dc613bae05af5cc1eafa75dc694
parent88d219e62b03a56767b1fb9f41693033701e589e
handle.c: rework pointer assignment logic

During the review on LKML, Thomas Gleixner stubled over the usage
of our 'p' variable assignment. Apparantly, the idea of assigning
memdup()'ed memory to a void pointer that is automatically freed
at the end of the function wasn't obvious to readers.

Let's fix this, and

a) make kdbus_memdup_user() return void* instead of int, so we can
   directly assign variables to the return value

b) assign the void* variable after the memdup, and call it 'free_ptr'
   to make clearer what's going on.

Signed-off-by: Daniel Mack <daniel@zonque.org>
handle.c