diff options
author | Stefan Hajnoczi <stefanha@gmail.com> | 2011-12-10 02:12:30 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-09 19:26:09 -0800 |
commit | 188e664502dc47f83775a556e6db52cd8cc0b5fc (patch) | |
tree | 146739a24800d2e99ba018274bcf7aea508e1da9 /drivers/staging/line6/toneport.c | |
parent | staging: line6: eliminate useless index_out variable (diff) | |
download | linux-dev-188e664502dc47f83775a556e6db52cd8cc0b5fc.tar.xz linux-dev-188e664502dc47f83775a556e6db52cd8cc0b5fc.zip |
staging: line6: eliminate useless NULL checks
The line6 driver checks struct field addresses for NULL where it does
not make sense to do so. The struct has already been checked for NULL
and there is no value in checking the first field's address too.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/line6/toneport.c')
-rw-r--r-- | drivers/staging/line6/toneport.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c index 879e6992bbc6..f31057830dbc 100644 --- a/drivers/staging/line6/toneport.c +++ b/drivers/staging/line6/toneport.c @@ -295,14 +295,10 @@ static struct snd_kcontrol_new toneport_control_source = { static void toneport_destruct(struct usb_interface *interface) { struct usb_line6_toneport *toneport = usb_get_intfdata(interface); - struct usb_line6 *line6; if (toneport == NULL) return; - line6 = &toneport->line6; - if (line6 == NULL) - return; - line6_cleanup_audio(line6); + line6_cleanup_audio(&toneport->line6); } /* |