From patchwork Fri Feb 10 11:44:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 726523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vKY7251Wgz9s6n for ; Fri, 10 Feb 2017 22:46:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbdBJLqE (ORCPT ); Fri, 10 Feb 2017 06:46:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52816 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbdBJLqE (ORCPT ); Fri, 10 Feb 2017 06:46:04 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 69C5680484; Fri, 10 Feb 2017 11:44:33 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-117-212.ams2.redhat.com [10.36.117.212]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1ABiWHG016715; Fri, 10 Feb 2017 06:44:32 -0500 From: Hans de Goede To: Thierry Reding Cc: Hans de Goede , linux-pwm@vger.kernel.org Subject: [PATCH] pwm: Fix compile error in pwm_get() Date: Fri, 10 Feb 2017 12:44:30 +0100 Message-Id: <20170210114430.21512-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 10 Feb 2017 11:44:33 +0000 (UTC) Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org commit bf71f4e8fb95 ("pwm: Try to load modules during pwm_get()") had error checking added to the request_module call it adds, before merging it. But the "err" variable the error checking uses was never declared, this commit fixes this. Signed-off-by: Hans de Goede --- Feel free to squash this into the original commit --- drivers/pwm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 50a33ca..4f3c0a1 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -831,7 +831,7 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id) * deferred probe mechanism. */ if (!chip && chosen->module) { - err = request_module(chosen->module); + int err = request_module(chosen->module); if (err == 0) chip = pwmchip_find_by_name(chosen->provider); }