Re: [PATCH] staging: comedi: pcmmio: fix possible NULL deref on detach

2013-08-20 Thread Ian Abbott
On 2013-08-20 11:50, Ian Abbott wrote: pcmmio_detach is called by the comedi core even if pcmmio_attach() returned an error, so `dev->private` might be `NULL`. Check for that before dereferencing it. Also, as pointed out by Dan carpenter for the similar pcmuio driver, there is no need to check

[PATCH] staging: comedi: pcmmio: fix possible NULL deref on detach

2013-08-20 Thread Ian Abbott
pcmmio_detach is called by the comedi core even if pcmmio_attach() returned an error, so `dev->private` might be `NULL`. Check for that before dereferencing it. Also, as pointed out by Dan carpenter for the similar pcmuio driver, there is no need to check the pointer passed to `kfree()`, so remov