From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbbKBDPO (ORCPT ); Sun, 1 Nov 2015 22:15:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:33378 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751582AbbKBDPM (ORCPT ); Sun, 1 Nov 2015 22:15:12 -0500 Date: Sun, 1 Nov 2015 19:15:11 -0800 From: Greg Kroah-Hartman To: Johannes Thumshirn Cc: Alexey Khoroshilov , linux-kernel , ldv-project@linuxtesting.org Subject: Re: [PATCH] mcb: Do not return zero on error path in mcb_pci_probe() Message-ID: <20151102031511.GA21893@kroah.com> References: <1445117635-7513-1-git-send-email-khoroshilov@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2015 at 09:28:57AM +0200, Johannes Thumshirn wrote: > On Sat, Oct 17, 2015 at 11:33 PM, Alexey Khoroshilov > wrote: > > There is an error path in mcb_pci_probe() where > > it returns zero instead of error code. > > > > Found by Linux Driver Verification project (linuxtesting.org). > > > > Signed-off-by: Alexey Khoroshilov > > --- > > drivers/mcb/mcb-pci.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c > > index 051645498b53..67d5e7d08df6 100644 > > --- a/drivers/mcb/mcb-pci.c > > +++ b/drivers/mcb/mcb-pci.c > > @@ -51,6 +51,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) > > priv->mapbase = pci_resource_start(pdev, 0); > > if (!priv->mapbase) { > > dev_err(&pdev->dev, "No PCI resource\n"); > > + ret = -ENODEV; > > goto out_disable; > > } > > > > -- > > 1.9.1 > > > > Applied, thanks. > > @Greg, shall I forward you the patch or do a pull request? Please forward on, I don't do many pull requests. greg k-h