Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3930775pxb; Wed, 13 Oct 2021 16:24:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJway7y+a6/toBFG7myRi/rm7+t7VzEMuPehfr9rA86qJ77Il+eVRSPp4uS6mldVtq23Ofru X-Received: by 2002:a17:90b:1804:: with SMTP id lw4mr2458727pjb.174.1634167442991; Wed, 13 Oct 2021 16:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634167442; cv=none; d=google.com; s=arc-20160816; b=lFl2/DPT7NbJ09aOAQ+XSQ2mHv3gzT0kp6fIzpIfxa2yOZeDotdqbgYyQvl7Nzgddb 9EL8yiXgxwJtNd5SG4OE+LebKoaLaWf3vnrXTL0Nhtqn5UlEsGcuiAJ2xMwp8l8Bu3gJ J0fd9xlTdZlv2UpOC/32ulOtYGvdmVSnhkv278BEPj0e8tngoAZYdckTvExOwf04N2K4 PR9RUSMEUJjnj93l99Y49Dl8CEiNr7zsv56//WnA0qLV0e/C3ZpLEUZC9l0LkvVd3dFM Ft59/pwhV4f4MX6Zq53Ximmn3jDB3iyq+L04zaOJIepMSzeC/Dy8zpQqWOzpICCZ6yJg NH+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=H6EqegnKDo8sMXWaLhv8BJTtwLgAHgGvHKzcwal8GJ0=; b=wrDUpurhEaqb7yzcQEG3buwKu4g+Y/79om8zgs9tRndupE2Ht3vgLEP71emZeAvFDq euTtYSN6hEns1KU/m81QqnqxKz+q59Ln/adwkxZdiyY1W5q8f2cjxIYiffih+EK16Wde zHMQ5/HQVPazkUrQke7dv1hf0uvJwnukhOpWMBm6wsSpNM7sIg3/iSjkZjjI+u285rtx 8NShahn13sKOWdHo6ItBmsFvVp6Kpeqkxgw5bdiSh0QkrWwcngX+d+1WKAdrtrwPVE9y n5qab2eiqTYrf6lPjLi5p8S42/NeMpW5+/dCf5Ay7waGjjJkKzmCZs9ZfWB34ZDGJ+FW wYCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKqzCjUp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e25si1346608pgv.612.2021.10.13.16.23.50; Wed, 13 Oct 2021 16:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKqzCjUp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbhJMXYR (ORCPT + 99 others); Wed, 13 Oct 2021 19:24:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbhJMXYQ (ORCPT ); Wed, 13 Oct 2021 19:24:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B46760E05; Wed, 13 Oct 2021 23:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634167332; bh=3coNBPGYON6/61PBewDmxBthlFwCOyqICDIw5Ze6JZU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uKqzCjUp2f7zhet88IYtCTKnHFtcYdP5WE6jXOnCpqJ/nLvvnzC1gr3I2B1Wjx/eS XUb8EWORfSjmGbS6dLvqMe0uaeCqPfV8Z3Vpr5JTnLPCt+88vqaRi5NqRyvAoUQT+b S7TEaWl5yH328SuJfek4gi+f8QV5kElF6e8qbgRJyqpIIXE/OFAWIHLNFhFxLOqROK bNyqNCEpnw7On/8ke2cDzfRPZuda+akwBRvKUA/keaGfx93rg+q4NgYVasP4YFFWSq /+xdASXoEWFpFouEtRejuDHts32XN05/37o2x06/rfwszOb6TZFhSUZ1or2IG7omBI DL8bp1gRwcEqA== Date: Wed, 13 Oct 2021 16:22:11 -0700 From: Jakub Kicinski To: Nanyong Sun Cc: , , , , , , , , , Subject: Re: [PATCH] net: encx24j600: check error in devm_regmap_init_encx24j600 Message-ID: <20211013162211.6cacd0e5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20211012125901.3623144-1-sunnanyong@huawei.com> References: <20211012125901.3623144-1-sunnanyong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Oct 2021 20:59:01 +0800 Nanyong Sun wrote: > devm_regmap_init may return error which caused by like out of memory, > this will results in null pointer dereference later when reading > or writing register: Applied, but... > -void devm_regmap_init_encx24j600(struct device *dev, > +int devm_regmap_init_encx24j600(struct device *dev, > struct encx24j600_context *ctx) > -void devm_regmap_init_encx24j600(struct device *dev, > +int devm_regmap_init_encx24j600(struct device *dev, > struct encx24j600_context *ctx); .. please make sure you adjust the continuation lines. checkpatch points this out.