From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 19D8C1C2532 for ; Tue, 28 Mar 2017 13:35:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1315389430 for ; Tue, 28 Mar 2017 13:35:59 +0000 (UTC) Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gC3hiG1FfjDX for ; Tue, 28 Mar 2017 13:35:58 +0000 (UTC) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0072.outbound.protection.outlook.com [104.47.34.72]) by hemlock.osuosl.org (Postfix) with ESMTPS id 2CE018754A for ; Tue, 28 Mar 2017 13:35:58 +0000 (UTC) From: David Kershner Subject: [PATCH 33/44] staging: unisys: visorbus: check for err from dev_set_name Date: Tue, 28 Mar 2017 09:34:50 -0400 Message-ID: <121c6acb14e502bc938dda73ad875b81c8c2566f.1490672385.git-series.david.kershner@unisys.com> In-Reply-To: References: MIME-Version: 1.0 List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: gregkh@linuxfoundation.org, driverdev-devel@linuxdriverproject.org, sparmaintainer@unisys.com, jes.sorensen@gmail.com The function dev_set_name can return an error, don't just ignore it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell --- drivers/staging/unisys/visorbus/visorbus_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index ce897a2..f5b637c 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -642,8 +642,10 @@ create_visor_device(struct visor_device *dev) * (NOT bus instance). That's why we need to include the bus * number within the name. */ - dev_set_name(&dev->device, "vbus%u:dev%u", - chipset_bus_no, chipset_dev_no); + err = dev_set_name(&dev->device, "vbus%u:dev%u", + chipset_bus_no, chipset_dev_no); + if (err) + goto err_put; /* * device_add does this: -- git-series 0.9.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel