Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp469475ybb; Thu, 28 Mar 2019 06:15:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBwa177JHnVdZmDmMfvdGsFc+nW0BLuUbPertsvbrT3UVw0LOjOLaaG/irrR5pguFMAP4i X-Received: by 2002:a62:1690:: with SMTP id 138mr2277757pfw.28.1553778937989; Thu, 28 Mar 2019 06:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553778937; cv=none; d=google.com; s=arc-20160816; b=Q4rY6ZLoNzXitLgHHfQ7+tJyPkJ+MOqnKpqxs9hRCtixDmkBTavJt9nI30AyKYRqYA bawHXv2o25G0rICwqESgmxeMK0O2DjrQMbq6reNOWwWz97gzvK+QarXO1HcF1fN9A0Qp wAuXCVwaucgDn6WBmCry8m6qtJh5UrkBo3UQuz1fyzEB6PwYSQrtM8XGFzQvK6NWXW18 8FMncbViTA3Pyu91GvkQXMzhutSFNxY39upp4StQmHuOMbNqRONMQ6A3TdsgQAwMM+iH cfqejV03ka9IlWC9NAOddFTMSY1Ozzpb6MxWOG5c+qi7mNCcg72CMiFcTh13IbISbts8 ks7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=B00zaW59jIX5ztVE/c1bA3jeD5du4zBzp09mTtehjL4=; b=bQ4YUCBB8m9McxO69+SJtK3b9hSS0lypDjnMCwosNmySYiaof2AvN09E23DBiGYyus 3L2invz6agid54oiiNKtLqj+omaVfqnXMtFQk6tpSIwCjRnKMaJuAAj03ECbarBYBXmB Z9pUFKK9Rs8W9GeV5KbFYUTVs/54XYHZn2f5y1OSJzml4NaaW9QM+V574pDOfyRZmdrP vlWhcTrS+Hry0V5GAP7aI2N4muV+0Vp5NdcW/unyy1csCfiy1BcAU8gJUYk3cennGZzd lSDY3PVrv1jyp6WfV3c9Qg8Ud0kdcqHnLjjc+jjG2bElgTVBLpcZPOLzbZ4zqCL7X/e9 IYSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj7si18402173plb.408.2019.03.28.06.15.22; Thu, 28 Mar 2019 06:15:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726540AbfC1NNx (ORCPT + 99 others); Thu, 28 Mar 2019 09:13:53 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:52606 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbfC1NNx (ORCPT ); Thu, 28 Mar 2019 09:13:53 -0400 Received: from ramsan ([84.194.111.163]) by xavier.telenet-ops.be with bizsmtp id tRDr1z0073XaVaC01RDrtC; Thu, 28 Mar 2019 14:13:51 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1h9Uqt-0005Fi-1J; Thu, 28 Mar 2019 14:13:51 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1h9Uqs-0004uc-VA; Thu, 28 Mar 2019 14:13:50 +0100 From: Geert Uytterhoeven To: Linus Walleij , Bartosz Golaszewski Cc: Benoit Parrot , Laxman Dewangan , Tomeu Vizoso , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 0/3] gpio: Failure path fixes Date: Thu, 28 Mar 2019 14:13:46 +0100 Message-Id: <20190328131349.18838-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Bartosz, After making a silly mistake in a pin control driver, pinctrl driver initialization failed, causing an avalanche of GPIO driver failures, and I was greeted by the following scary messages: OF: ERROR: Bad of_node_put() on /soc/gpio@e6050000 ... WARNING: CPU: 0 PID: 1 at lib/refcount.c:156 kobject_get+0x38/0x4c ... WARNING: CPU: 0 PID: 1 at lib/refcount.c:190 refcount_sub_and_test_checked+0x3c/0xa8 The first two patches fix bugs in related error paths, after which the messages are gone. The third patch is a drive-by fix for function comment. Thanks for your comments! Geert Uytterhoeven (3): gpio: of: Fix of_gpiochip_add() error path gpio: Fix gpiochip_add_data_with_key() error path gpio: Remove obsolete comment about gpiochip_free_hogs() usage drivers/gpio/gpiolib-of.c | 8 +++++++- drivers/gpio/gpiolib.c | 14 ++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) -- 2.17.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds