From patchwork Thu Dec 19 15:03:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Levente Kurusa X-Patchwork-Id: 3382011 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 897C99F314 for ; Thu, 19 Dec 2013 15:14:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E218D20692 for ; Thu, 19 Dec 2013 15:13:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F1622066D for ; Thu, 19 Dec 2013 15:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937Ab3LSPEr (ORCPT ); Thu, 19 Dec 2013 10:04:47 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:51098 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754091Ab3LSPEp (ORCPT ); Thu, 19 Dec 2013 10:04:45 -0500 Received: by mail-ea0-f181.google.com with SMTP id m10so542375eaj.40 for ; Thu, 19 Dec 2013 07:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bznuh3MzkXff2q/+6Hd+JlRpH6h+uKoJYcWHCFkiJSU=; b=WjwPCUINBHogEtgsg+cRjrj8BFqqupk0qgRw7ywncboM5yNFOWfgJjlzbAdvpIJzXh yWTaJrY+B92uP8fGq26ck6+VMhrjqFdcJ76QGnZ59N8Mn1DJSAHNIoGvitHzLFhwbk3N lwaCiSOeFJfttU/9jj67DRxIOQbf5bOVB8ff4bOGAMAouRXy7mlu5wzx0uc2fzXnfRe0 KwWN0yc6liGpItQvqQPUC2SNPoHkFg/eMCD78RrYFKAVAx7MRQvD9PVEyHIWV5Z27sej qxwTVqNb4xg11sEfeuockOFgDAg74y6KxmDAbXtk5bATd5MKDg8K4IIp7ueb+NJRoUTh N39Q== X-Received: by 10.14.208.199 with SMTP id q47mr4997eeo.77.1387465483839; Thu, 19 Dec 2013 07:04:43 -0800 (PST) Received: from localhost.tiszanet.hu (mail.mediaweb.hu. [62.201.96.214]) by mx.google.com with ESMTPSA id h48sm10102799eev.3.2013.12.19.07.04.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Dec 2013 07:04:43 -0800 (PST) From: Levente Kurusa To: LKML Cc: Levente Kurusa , "James E.J. Bottomley" , Helge Deller , Chen Gang , linux-parisc@vger.kernel.org Subject: [PATCH 17/38] parisc: kernel: add missing put_device call Date: Thu, 19 Dec 2013 16:03:28 +0100 Message-Id: <1387465429-3568-18-git-send-email-levex@linux.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1387465429-3568-2-git-send-email-levex@linux.com> References: <1387465429-3568-2-git-send-email-levex@linux.com> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is required so that we give up the last reference to the device. Signed-off-by: Levente Kurusa --- arch/parisc/kernel/drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 14285ca..b97cc05 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -428,7 +428,7 @@ struct parisc_device * create_tree_node(char id, struct device *parent) dev->dev.dma_mask = &dev->dma_mask; dev->dev.coherent_dma_mask = dev->dma_mask; if (device_register(&dev->dev)) { - kfree(dev); + put_device(&dev->dev); return NULL; }