]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: misc: sisusbvga: Avoid NULL pointer dereference from sisusb
authorColin Ian King <colin.king@canonical.com>
Fri, 15 Mar 2013 17:14:57 +0000 (17:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 18:51:01 +0000 (11:51 -0700)
commita1645eefc8358d0a9dbeba254e51aa89de4d80a4
tree28e67aa52534b4e66b0c8eaff3980d718fe84be3
parent5b2750d5b5a25c9c8b842e22fb2a7015dc798455
usb: misc: sisusbvga: Avoid NULL pointer dereference from sisusb

A failed kzalloc() is reported with a dev_err that dereferences the null
sisusb, this will cause a NULL pointer deference error.

Instead, pass dev->dev to the dev_err() rather than &sisusb->sisusb_dev->dev

Smatch analysis:

drivers/usb/misc/sisusbvga/sisusb.c:3087 sisusb_probe() error: potential null
  dereference 'sisusb'.  (kzalloc returns null)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/sisusbvga/sisusb.c