Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752938AbcLES2L (ORCPT ); Mon, 5 Dec 2016 13:28:11 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:47540 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbcLES2E (ORCPT ); Mon, 5 Dec 2016 13:28:04 -0500 Date: Mon, 05 Dec 2016 13:28:02 -0500 (EST) Message-Id: <20161205.132802.1758015753602111376.davem@davemloft.net> To: bianpan2016@163.com Cc: 3chas3@gmail.com, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] atm: lanai: set error code when ioremap fails From: David Miller In-Reply-To: <1480767945-5676-1-git-send-email-bianpan2016@163.com> References: <1480767945-5676-1-git-send-email-bianpan2016@163.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 05 Dec 2016 09:28:41 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 446 Lines: 13 From: Pan Bian Date: Sat, 3 Dec 2016 20:25:45 +0800 > In function lanai_dev_open(), when the call to ioremap() fails, the > value of return variable result is 0. 0 means no error in this context. > This patch fixes the bug, assigning "-ENOMEM" to result when ioremap() > returns a NULL pointer. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188791 > > Signed-off-by: Pan Bian Applied.