Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1851574imm; Thu, 14 Jun 2018 05:03:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPPlIBYXCl818embMVyOm7p1Y8Na+626GvMZe9i4EPoypUFjQgcvG//184GY0L38nsUk9l X-Received: by 2002:a62:5d83:: with SMTP id n3-v6mr9290780pfj.68.1528977805533; Thu, 14 Jun 2018 05:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528977805; cv=none; d=google.com; s=arc-20160816; b=dpzMBcXfD3FzmLqEIWY9wlYx0WDW2yHB2c0CN6cB03D7F1hVWGqlxKNYuIzW76amdX s41vl8ZyPzQ58fbKHDOV1Ldz1zH4GldfsQ5xWvi3V2r6FDkhx1P7ggIe7w8QDraAUA3f 3cqi2pSRIVK6ujRLq4A0TEZ3f7GAlkcvOpHhr0LtpbObdfaRtU2XLRYsyNWK1WP4RV/t dKbx4no9ljOjPNeyi2XyYd4W8w+fV+N+pSPiHSGQUNJplR+m8PuZEppRvwrWfiRrnMIt vl1wVuzKL1DMtkNMdc/UTRT2YJi2A+S1kbeEqYO5X4Jj3gHCDjuMhijmR1kSvibysfU1 IYOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=fLhSW3KG0kQmZti18DpUdNS6AbKNzGJOXSzJmL0TeO8=; b=Zhpc0IXONtJLBR+zimdPLluywmCS9Fj2n8H7Y4DDTyoOk9GsVbQQ7Pnr+jzJrxQGgt 1ya4svPcaOl/8nVt7kfUfCGHjTfv+GvU4oUHPxSd6zK60ph90znU1ya+3aJ/0mC+I0uz URsPWvrB9fwHQPDhe1N1n56pbUdKheojOJoMSB3lUGlPc02pnwAlNZOs35HAOUP+lA2q L4cn9UXaptk7L5rAzlhjgy2CQybVchCqZwKqWOXFvqXcnmqpSARjDvdf6VFhVgI3XD8u qmlZ/TIYgVrWVv485++sGE7qfBKuYfij7pnBWVoICzKhNTLcxvvLv/3PkQL9kZhirkQw //Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GK7Skdw9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j189-v6si4840251pfg.351.2018.06.14.05.03.10; Thu, 14 Jun 2018 05:03:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GK7Skdw9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755072AbeFNMAd (ORCPT + 99 others); Thu, 14 Jun 2018 08:00:33 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:37438 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885AbeFNMAb (ORCPT ); Thu, 14 Jun 2018 08:00:31 -0400 Received: by mail-ua0-f195.google.com with SMTP id l14-v6so505571uao.4; Thu, 14 Jun 2018 05:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fLhSW3KG0kQmZti18DpUdNS6AbKNzGJOXSzJmL0TeO8=; b=GK7Skdw963p84Og2aIGelNHuAKfVJYFy9eyhRwG0trgomImTPELVFMHFZapdzezaSM 9eQvde4T1FQt3EK/5laatCW5MnVFE4AFryk7a2lQI2qgkwXgCdUpI72DC4TUwyEZTn7U pIavWEUBtgdSDrqFGl4OjVO4Eb30fA1PYTaKEOGUgMOYfRm83Af470E+kx8oqyzWAi3j aJvXgAbDr+1SlqCpIyqluSjE5HCVs4fPsafWGyBPPdNkyDPHopeUbMF08ISzZq4fG8pX DQO8gtI3HzaQX2jssWeYVbxFhejQhGEb4cVMOOuoP1vZDLVTTA9/raQGAty94Z2k4STE kYhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fLhSW3KG0kQmZti18DpUdNS6AbKNzGJOXSzJmL0TeO8=; b=KfvZlfJgr4CuHzs4I5f46k59ExAcrpuxkMIOPnj85lbNt7bJVhA89yp9kSqhkFtSr0 //x4h8h1KHUbeVmYj0SUESVE/sq2LOT9LT5uGjNGENQm2Txmc1mE9EOznryW0vy0lqMF K2RxAZdqGrLYtn9tcUV1Kk3ZC1Hz94cnA2TvWdVv7OYptN1AONpHIt5yFIxYvPOvZ9fW nOp2jHjyO2t4WNf/0Xby3VTEdfAXRiJAt49xAPpMTvh/KVp5NkqOfFyVik+PfYGRbob6 HfkMjAaxd0pkHyDF+NL6b1KghbPRGRN+90izZSMtD/2Pod6NCfL4BP6dXVTTUUt9Xl1Q yRqA== X-Gm-Message-State: APt69E2UtU76gv7MtF75Se7EnLw7IhX0EbiMUjGP4msP6wGByQBDBAUl 7JqINC2R9H2ldbkML5GoxJsnzxNHmP/Uu+LhYHQ= X-Received: by 2002:ab0:1446:: with SMTP id c6-v6mr1485315uae.12.1528977630761; Thu, 14 Jun 2018 05:00:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:8b02:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 05:00:30 -0700 (PDT) In-Reply-To: <1528977459-52285-1-git-send-email-jiazhouyang09@gmail.com> References: <1528705581-34646-1-git-send-email-jiazhouyang09@gmail.com> <1528977459-52285-1-git-send-email-jiazhouyang09@gmail.com> From: Andy Shevchenko Date: Thu, 14 Jun 2018 15:00:30 +0300 Message-ID: Subject: Re: [PATCH v2] scsi: bfa: add error handling for pci_iomap To: Zhouyang Jia Cc: Anil Gurumurthy , Sudarsana Kalluru , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 14, 2018 at 2:57 PM, Zhouyang Jia wrote: > When pci_iomap fails, the lack of error-handling code may > cause unexpected results. What results? How had you tested it? > This patch adds error-handling code after calling pci_iomap. > + if (bfad->pci_bar2_kva == NULL) { > + printk(KERN_ERR "Fail to map bar2\n"); pr_err() ? > + goto out_unmap_bar0; > + } -- With Best Regards, Andy Shevchenko