From owner-svn-src-head@freebsd.org Wed Jun 1 08:20:11 2016 Return-Path: Delivered-To: svn-src-head@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 64567B55043; Wed, 1 Jun 2016 08:20:11 +0000 (UTC) (envelope-from zbb@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 362B81CF8; Wed, 1 Jun 2016 08:20:11 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u518KA2Y045731; Wed, 1 Jun 2016 08:20:10 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u518KA9V045730; Wed, 1 Jun 2016 08:20:10 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201606010820.u518KA9V045730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 1 Jun 2016 08:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301112 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 08:20:11 -0000 Author: zbb Date: Wed Jun 1 08:20:10 2016 New Revision: 301112 URL: https://svnweb.freebsd.org/changeset/base/301112 Log: Return real error value instead of hard-coded ENXIO (fix after r300149) It is possible to return real error value in case of gic_v3_attach() failure instead of hard-coded ENXIO. Obtained from: Semihalf Sponsored by: Cavium Modified: head/sys/arm64/arm64/gic_v3_fdt.c Modified: head/sys/arm64/arm64/gic_v3_fdt.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_fdt.c Wed Jun 1 08:20:07 2016 (r301111) +++ head/sys/arm64/arm64/gic_v3_fdt.c Wed Jun 1 08:20:10 2016 (r301112) @@ -141,11 +141,13 @@ gic_v3_fdt_attach(device_t dev) xref = OF_xref_from_node(ofw_bus_get_node(dev)); if (intr_pic_register(dev, xref) == NULL) { device_printf(dev, "could not register PIC\n"); + err = ENXIO; goto error; } if (intr_pic_claim_root(dev, xref, arm_gic_v3_intr, sc, GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { + err = ENXIO; goto error; } #endif @@ -172,7 +174,7 @@ error: /* Failure so free resources */ gic_v3_detach(dev); - return (ENXIO); + return (err); } /* OFW bus interface */