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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9DCE2C4167B for ; Sat, 2 Dec 2023 04:12:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WcorauD2NckIvf4bpLAtpJAroX4tEZDiSNvS2xxODhI=; b=tHUgOrjzQDve/6 k3golnOLI0dmcjdZNIxPZbczhljdT0KEsBYxY6h0gm+pCEyAEukoWsqYrtSP1ClaFfszD/Z0P2apA fa+bISA7yob0Oml73zD55neOJCw0RJpxJ3Szx62I37kPYs6gnPcwf5M47/qzIGt6/bgpOZ1YhjrXq L6e+ypm58a9YbscfpHwWm0XNYWk8/3EClsoUCgzYvxESvT3ijtL6qHByjag9qjjT8OaG6U/G6H0Fg +AJQQxaHPedHLFnL1Shywb97Yx7z/dQNfJEXiI1s11rk4trb0G2YHMhxO2BjFZzRXl0+xhM5i4scG JXHxwy5m8HRYwYOntpZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r9HMA-00F8N9-0j; Sat, 02 Dec 2023 04:11:54 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r9HM6-00F8Mi-34; Sat, 02 Dec 2023 04:11:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id D78B4B8243F; Sat, 2 Dec 2023 04:11:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E470C433C9; Sat, 2 Dec 2023 04:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701490307; bh=1+nNWFO5K984/3PjlBg4MbMZtLgdAePl/arFcHZyCBA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=antRZhyW9OJFc8PJ7MCSBpl6Dv69m+q310z41f5BZ/8TllOiIJ62hf3xpm+XMpn+h 47BwXTTORiE9/QXFF8aCeCV6KhfJ6Xy0bh9mj4zVjh8kqeKEODT94iwqph+tuX9zyq 6/O4dDG/hVM4Y06aH4THs12QwoToJGi3fnOI2kkTuDZM7asYag+tr0TZdt+oDn0M/A TPl0W+piJh+vojH5+VC+MFBWZCuDBQjg3X4oVYp8qlgr5PevF7YMB5xel3ZLvF23Rq INA9XYXS5/kS+CXxkUjC2L1jNojvnAJ6XoRcpQ6i6Y8Ms52bPyvbyC/Pj68upurhtD 9uV4BuIuqvocg== Date: Fri, 1 Dec 2023 20:11:46 -0800 From: Jakub Kicinski To: Haoran Liu Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, heiko@sntech.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [net/ethernet] arc_emac: Add error handling in emac_rockchip_probe Message-ID: <20231201201146.12aa16df@kernel.org> In-Reply-To: <20231130031318.35850-1-liuhaoran14@163.com> References: <20231130031318.35850-1-liuhaoran14@163.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231201_201151_144645_78DD939D X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 29 Nov 2023 19:13:18 -0800 Haoran Liu wrote: > Although the error addressed by this patch may not occur in the current > environment, I still suggest implementing these error handling routines > if the function is not highly time-sensitive. As the environment evolves > or the code gets reused in different contexts, there's a possibility that > these errors might occur. Addressing them now can prevent potential > debugging efforts in the future, which could be quite resource-intensive. Please skip this pointless boilerplate. > match = of_match_node(emac_rockchip_dt_ids, dev->of_node); > + if (!match) { > + dev_err(dev, "No matching device found\n"); > + return -ENODEV; "device" and ENODEV are not right here. -- pw-bot: cr _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel