From patchwork Wed Jun 15 00:38:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 880682 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5F0dcts014124 for ; Wed, 15 Jun 2011 00:39:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753508Ab1FOAjh (ORCPT ); Tue, 14 Jun 2011 20:39:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089Ab1FOAjh (ORCPT ); Tue, 14 Jun 2011 20:39:37 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5F0cK8U022636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Jun 2011 20:38:21 -0400 Received: from warthog.procyon.org.uk ([10.3.112.12]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5F0cIJY004307; Tue, 14 Jun 2011 20:38:19 -0400 From: David Howells Subject: [PATCH] EFIFB: Fix error handling To: pjones@redhat.com Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, David Howells , Peter Jones , linux-fbdev@vger.kernel.org, stable@kernel.org Date: Wed, 15 Jun 2011 01:38:17 +0100 Message-ID: <20110615003817.18883.41030.stgit@warthog.procyon.org.uk> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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.6 (demeter1.kernel.org [140.211.167.41]); Wed, 15 Jun 2011 00:39:38 +0000 (UTC) Fix the error handling in the EFIFB driver if platform_driver_probe() fails. In that case, the code will pass the driver struct to the _device_ unregistration function. It presumably should pass a pointer to the device struct instead. The compiler gives the following warning to indicate this: drivers/video/efifb.c: In function 'efifb_init': drivers/video/efifb.c:544:3: warning: passing argument 1 of 'platform_device_unregister' from incompatible pointer type include/linux/platform_device.h:40:13: note: expected 'struct platform_device *' but argument is of type 'struct platform_driver *' Signed-off-by: David Howells cc: Peter Jones cc: linux-fbdev@vger.kernel.org cc: stable@kernel.org --- drivers/video/efifb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 69c49df..784139a 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c @@ -541,7 +541,7 @@ static int __init efifb_init(void) */ ret = platform_driver_probe(&efifb_driver, efifb_probe); if (ret) { - platform_device_unregister(&efifb_driver); + platform_device_unregister(&efifb_device); return ret; }