staging: gasket: remove duplicate call to retrieve device callback
authorTodd Poynor <toddpoynor@google.com>
Sat, 21 Jul 2018 13:34:55 +0000 (06:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jul 2018 11:56:45 +0000 (13:56 +0200)
commit996e650030857e791416af81d7d9171d9652bd9d
treee334f43b1a2d2627b2649887b30b8bf9e0ce261b
parent59ab5af731565762189d2f923887933fc1e84bcf
staging: gasket: remove duplicate call to retrieve device callback

gasket_handle_ioctl() calls gasket_get_ioctl_permissions_cb() twice;
simplify the code and avoid duplicated work by fetching the callback
pointer only once.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_ioctl.c