drivers/pcmcia: omap1: Fix error in automated timer conversion
authorKees Cook <keescook@chromium.org>
Sun, 5 Nov 2017 02:36:43 +0000 (19:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Nov 2017 10:30:48 +0000 (11:30 +0100)
One part of automated timer conversion tools did not take into account
void * variables when searching out prior direct timer callback usage,
which resulted in an attempt to dereference the timer field without a
proper type.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pcmcia/omap_cf.c

index 8216ceb51b1813bef5a9b0e202c1bcc59d85ef3b..c2a17a79f0b2ff86fa1fc5cd29a2ce49289bc669 100644 (file)
@@ -102,7 +102,9 @@ static void omap_cf_timer(struct timer_list *t)
  */
 static irqreturn_t omap_cf_irq(int irq, void *_cf)
 {
-       omap_cf_timer(&_cf->timer);
+       struct omap_cf_socket *cf = (struct omap_cf_socket *)_cf;
+
+       omap_cf_timer(&cf->timer);
        return IRQ_HANDLED;
 }