staging: line6: toneport.c: Fix for possible null pointer dereference
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Mon, 12 Jan 2015 20:42:34 +0000 (12:42 -0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jan 2015 21:23:56 +0000 (22:23 +0100)
commita248ce068f560ece6b72eb75b54380e3d800cbab
treed17d1c3e444171ac2cf3c150ce9c19d82a618706
parenteaa27f34e91a14cdceed26ed6c6793ec1d186115
staging: line6: toneport.c: Fix for possible null pointer dereference

The NULL check was done to late, and there it was a risk
of a possible null pointer dereference.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/staging/line6/toneport.c