Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756516AbXHMEES (ORCPT ); Mon, 13 Aug 2007 00:04:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751319AbXHMEEH (ORCPT ); Mon, 13 Aug 2007 00:04:07 -0400 Received: from smtp3.hushmail.com ([65.39.178.135]:57544 "EHLO smtp3.hushmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbXHMEEG (ORCPT ); Mon, 13 Aug 2007 00:04:06 -0400 Date: Mon, 13 Aug 2007 00:04:05 -0400 To: , , Subject: [PATCH 3 of 5 ] /drivers/char/drm ioremap balancing/ returncode check Reply-to: postfail@hushmail.com From: "Scott Thompson" Content-type: text/plain; charset="UTF-8" Message-Id: <20070813040406.1E2EBDA820@mailserver8.hushmail.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1153 Lines: 36 patchset against 2.6.23-rc2 and this set is an audit of /drivers/char/a* through drivers/char . this corrects missing ioremap return checks and balancing on iounmap calls.. Signed-off-by: Scott Thompson hushmail.com> ---------------------------------------------------------- diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index 923174c..448488b 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c @@ -177,8 +177,13 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset, MTRR_TYPE_WRCOMB, 1); } } - if (map->type == _DRM_REGISTERS) + if (map->type == _DRM_REGISTERS) { map->handle = ioremap(map->offset, map->size); + if (!map->handle) { + drm_free(map, sizeof(*map), DRM_MEM_MAPS); + return -ENOMEM; + } + } break; case _DRM_SHM: list = drm_find_matching_map(dev, map); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/