From patchwork Tue Jan 20 08:20:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Rorvick X-Patchwork-Id: 5666091 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8E4CAC058D for ; Tue, 20 Jan 2015 08:22:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9765203A5 for ; Tue, 20 Jan 2015 08:22:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6BB4F20386 for ; Tue, 20 Jan 2015 08:22:16 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 45158261B0E; Tue, 20 Jan 2015 09:22:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 138442619D8; Tue, 20 Jan 2015 09:21:18 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2DC7C2617B8; Tue, 20 Jan 2015 09:21:17 +0100 (CET) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com [209.85.213.174]) by alsa0.perex.cz (Postfix) with ESMTP id 4A0D9260536 for ; Tue, 20 Jan 2015 09:21:07 +0100 (CET) Received: by mail-ig0-f174.google.com with SMTP id b16so9370332igk.1 for ; Tue, 20 Jan 2015 00:21:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=1ruGXEfD946rEW/n/UM8tIZLWHJl17CGtoLMoRiSxQ8=; b=QaTsSguiTvsGKkkZ5zM8fRIS+0vPxNSjy7XBBw5ial/BgrCkRf5ZbZcki4A4Djflqn NAwU5ZNzNLdLt+L4hD+f57tf3Lxa8bSbnj5lnEFFKqLzqQodA75/5MaoNvlU0XOASYWs QT1gDfPcLg7TnD3+LwgoV5yHBMX9qxfm6e2xulS6QbJTG2PT+39bLUYnJbKfAQDt6NY0 iIoXo+M8Le4IyqqQUI7jJdvTkFTVF4cb4yQZ8K0p6GVmmg561lJQSL4pxn250RWoVl46 9C+++OJGwa4NUCZmf8z1pdZN1HoY/mi+30rD03Q/vs6vpwJDvtedUOZZ5fwuBAJpiiKg ew2w== X-Received: by 10.43.126.67 with SMTP id gv3mr33286448icc.31.1421742063987; Tue, 20 Jan 2015 00:21:03 -0800 (PST) Received: from localhost.localdomain.com (adsl-99-141-246-205.dsl.emhril.sbcglobal.net. [99.141.246.205]) by mx.google.com with ESMTPSA id d1sm1992433igr.20.2015.01.20.00.21.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 00:21:03 -0800 (PST) From: Chris Rorvick To: Takashi Iwai Date: Tue, 20 Jan 2015 02:20:48 -0600 Message-Id: <1421742050-13299-2-git-send-email-chris@rorvick.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421742050-13299-1-git-send-email-chris@rorvick.com> References: <1421742050-13299-1-git-send-email-chris@rorvick.com> Cc: Stefan Hajnoczi , alsa-devel@alsa-project.org, Chris Rorvick Subject: [alsa-devel] [PATCH 1/3] ALSA: line6: Remove superfluous NULL checks X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Chris Rorvick --- sound/usb/line6/driver.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index a3da18b..3757b0c 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c @@ -456,21 +456,11 @@ int line6_probe(struct usb_interface *interface, const struct line6_properties *properties, int (*private_init)(struct usb_interface *, struct usb_line6 *)) { - struct usb_device *usbdev; + struct usb_device *usbdev = interface_to_usbdev(interface); struct snd_card *card; int interface_number; int ret; - if (!interface) { - ret = -ENODEV; - goto err_put; - } - usbdev = interface_to_usbdev(interface); - if (!usbdev) { - ret = -ENODEV; - goto err_put; - } - /* we don't handle multiple configurations */ if (usbdev->descriptor.bNumConfigurations != 1) { ret = -ENODEV;