From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D4DDC3276D for ; Thu, 2 Jan 2020 22:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63ED120866 for ; Thu, 2 Jan 2020 22:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004604; bh=t3aBh3Tx1OF2v9SdH8U1e/PU0MvipSraLBO4pgUP378=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=C4hxJsntxrqQfNkpKWz0aTEh2xQIWeIFwl/uzykVmqYQiF9G+1tmSsjwgkhOiXLyd dOatKaGCO8q3JqwdfBtUaJqBj2o5vzzaGcMsw+rW50XLr8zs+C7yiwfiGhUpxfC9YU y1kySKiQkqvlg2khgF9++trbWvfV40R8/ekZs1q8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730600AbgABWgm (ORCPT ); Thu, 2 Jan 2020 17:36:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:48200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730856AbgABWgk (ORCPT ); Thu, 2 Jan 2020 17:36:40 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D1021217F4; Thu, 2 Jan 2020 22:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004600; bh=t3aBh3Tx1OF2v9SdH8U1e/PU0MvipSraLBO4pgUP378=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QDrbrbPGzhq99ssHf6fG87fm6MJ1vWAJbn7tbm8GOhAC7vBFX2uyqzFI3Fy83/kva RlhsAGKV02dWN08CkaUjdvl2F6IumWmH+OOOtDQJq/SaIvjWP+RgMOq6E2Lh6N80DF Y8IPo0cjGIHzxqqM6hZfAH9Bk76oyPRvBRxfrDXI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , "David S. Miller" Subject: [PATCH 4.4 074/137] fjes: fix missed check in fjes_acpi_add Date: Thu, 2 Jan 2020 23:07:27 +0100 Message-Id: <20200102220556.608097392@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chuhong Yuan [ Upstream commit a288f105a03a7e0e629a8da2b31f34ebf0343ee2 ] fjes_acpi_add() misses a check for platform_device_register_simple(). Add a check to fix it. Fixes: 658d439b2292 ("fjes: Introduce FUJITSU Extended Socket Network Device driver") Signed-off-by: Chuhong Yuan Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/fjes/fjes_main.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -149,6 +149,9 @@ static int fjes_acpi_add(struct acpi_dev /* create platform_device */ plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource, ARRAY_SIZE(fjes_resource)); + if (IS_ERR(plat_dev)) + return PTR_ERR(plat_dev); + device->driver_data = plat_dev; return 0;