summaryrefslogtreecommitdiff
path: root/drivers/staging/line6/pod.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@gmail.com>2011-12-10 01:12:30 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-10 03:26:09 (GMT)
commit188e664502dc47f83775a556e6db52cd8cc0b5fc (patch)
tree146739a24800d2e99ba018274bcf7aea508e1da9 /drivers/staging/line6/pod.c
parent153e38761d27f29edf436f11da3dbfb4fb8edcc1 (diff)
downloadlinux-fsl-qoriq-188e664502dc47f83775a556e6db52cd8cc0b5fc.tar.xz
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/pod.c')
-rw-r--r--drivers/staging/line6/pod.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index d9b3021..4dadc57 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -1149,14 +1149,10 @@ static struct snd_kcontrol_new pod_control_monitor = {
static void pod_destruct(struct usb_interface *interface)
{
struct usb_line6_pod *pod = usb_get_intfdata(interface);
- struct usb_line6 *line6;
if (pod == NULL)
return;
- line6 = &pod->line6;
- if (line6 == NULL)
- return;
- line6_cleanup_audio(line6);
+ line6_cleanup_audio(&pod->line6);
del_timer(&pod->startup_timer);
cancel_work_sync(&pod->startup_work);