1. 28 Dec, 2010 2 commits
  2. 23 Dec, 2010 2 commits
  3. 16 Dec, 2010 16 commits
  4. 08 Dec, 2010 2 commits
  5. 01 Dec, 2010 3 commits
  6. 22 Nov, 2010 5 commits
  7. 20 Nov, 2010 1 commit
    • Jesper Juhl's avatar
      Input: serio HIL MLC - don't deref null, don't leak and return proper error · 39de5210
      Jesper Juhl authored
      While reviewing various users of kernel memory allocation functions I came
      across drivers/input/serio/hil_mlc.c::hil_mlc_register() and noticed that:
      
       - it calls kzalloc() but fails to check for a NULL return before use.
       - it makes several allocations and if one fails it doesn't free the
         previous ones.
       - It doesn't return -ENOMEM in the failed memory allocation case (it just
         crashes).
      
      This patch corrects all of the above and also reworks the only caller of
      this function that I could find
      (drivers/input/serio/hp_sdc_mlc.c::hp_sdc_mlc_out()) so that it now checks
      the return value of hil_mlc_register() and properly propagates it on
      failure and I also restructured the code to remove some labels and goto's
      to make it, IMHO nicer to read.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Tested-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      39de5210
  8. 19 Nov, 2010 1 commit
  9. 18 Nov, 2010 5 commits
  10. 15 Nov, 2010 3 commits