From owner-svn-src-all@freebsd.org  Fri Sep 23 18:55:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB4B2BE7B87;
 Fri, 23 Sep 2016 18:55:33 +0000 (UTC)
 (envelope-from gonzo@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 95BCEB85;
 Fri, 23 Sep 2016 18:55:33 +0000 (UTC)
 (envelope-from gonzo@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NItW1K091972;
 Fri, 23 Sep 2016 18:55:32 GMT (envelope-from gonzo@FreeBSD.org)
Received: (from gonzo@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NItWhh091971;
 Fri, 23 Sep 2016 18:55:32 GMT (envelope-from gonzo@FreeBSD.org)
Message-Id: <201609231855.u8NItWhh091971@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: gonzo set sender to
 gonzo@FreeBSD.org using -f
From: Oleksandr Tymoshenko <gonzo@FreeBSD.org>
Date: Fri, 23 Sep 2016 18:55:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r306275 - head/sys/dev/usb/input
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Sep 2016 18:55:33 -0000

Author: gonzo
Date: Fri Sep 23 18:55:32 2016
New Revision: 306275
URL: https://svnweb.freebsd.org/changeset/base/306275

Log:
  Do not perform extra check for NULL, evdev_free can handle NULL value
  
  Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>

Modified:
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/usb/input/ukbd.c
==============================================================================
--- head/sys/dev/usb/input/ukbd.c	Fri Sep 23 18:54:08 2016	(r306274)
+++ head/sys/dev/usb/input/ukbd.c	Fri Sep 23 18:55:32 2016	(r306275)
@@ -1432,8 +1432,7 @@ ukbd_detach(device_t dev)
 #endif
 
 #ifdef EVDEV
-	if (sc->sc_evdev != NULL)
-		evdev_free(sc->sc_evdev);
+	evdev_free(sc->sc_evdev);
 #endif
 
 	if (KBD_IS_CONFIGURED(&sc->sc_kbd)) {