From patchwork Sun Jan 2 14:27:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 446211 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p02ERoxX021104 for ; Sun, 2 Jan 2011 14:27:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754261Ab1ABO1t (ORCPT ); Sun, 2 Jan 2011 09:27:49 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:58790 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753977Ab1ABO1s (ORCPT ); Sun, 2 Jan 2011 09:27:48 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id A710619BB64; Sun, 2 Jan 2011 15:27:46 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22353-09; Sun, 2 Jan 2011 15:27:42 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 60EAF19BB59; Sun, 2 Jan 2011 15:27:42 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 3121F6DF893; Sun, 2 Jan 2011 15:22:42 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id 465E0200A7; Sun, 2 Jan 2011 15:27:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 3A99848582; Sun, 2 Jan 2011 15:27:42 +0100 (CET) Date: Sun, 2 Jan 2011 15:27:42 +0100 (CET) From: Julia Lawall To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] drivers/video/carminefb.c: improve error handling Message-ID: MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 02 Jan 2011 14:27:51 +0000 (UTC) diff --git a/drivers/video/carminefb.c b/drivers/video/carminefb.c index 6b19136..caaa27d 100644 --- a/drivers/video/carminefb.c +++ b/drivers/video/carminefb.c @@ -654,7 +654,7 @@ static int __devinit carminefb_probe(struct pci_dev *dev, printk(KERN_ERR "carminefb: Memory bar is only %d bytes, %d " "are required.", carminefb_fix.smem_len, CARMINE_TOTAL_DIPLAY_MEM); - goto err_free_reg_mmio; + goto err_unmap_vregs; } if (!request_mem_region(carminefb_fix.smem_start, @@ -667,8 +667,6 @@ static int __devinit carminefb_probe(struct pci_dev *dev, carminefb_fix.smem_len); if (!hw->screen_mem) { printk(KERN_ERR "carmine: Can't ioremap smem area.\n"); - release_mem_region(carminefb_fix.smem_start, - carminefb_fix.smem_len); goto err_reg_smem; } @@ -710,7 +708,7 @@ err_deinit_hw: err_unmap_screen: iounmap(hw->screen_mem); err_reg_smem: - release_mem_region(carminefb_fix.mmio_start, carminefb_fix.mmio_len); + release_mem_region(carminefb_fix.smem_start, carminefb_fix.smem_len); err_unmap_vregs: iounmap(hw->v_regs); err_free_reg_mmio: