From patchwork Sun Dec 15 23:27:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 3351181 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D667FC0D4A for ; Sun, 15 Dec 2013 23:31:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2453D201EF for ; Sun, 15 Dec 2013 23:31:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69E942018A for ; Sun, 15 Dec 2013 23:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752705Ab3LOXbg (ORCPT ); Sun, 15 Dec 2013 18:31:36 -0500 Received: from ring0.de ([91.143.88.219]:40071 "EHLO smtp.ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522Ab3LOX2a (ORCPT ); Sun, 15 Dec 2013 18:28:30 -0500 Received: from comu.ring0.de (unknown [127.0.0.1]) by smtp.ring0.de (Postfix) with ESMTP id 402052C58FC0; Mon, 16 Dec 2013 00:28:29 +0100 (CET) Received: (from spamd@localhost) by comu.ring0.de (8.13.8/8.13.8/Submit) id rBFNSRNI023028; Mon, 16 Dec 2013 00:28:27 +0100 X-Authentication-Warning: comu.ring0.de: spamd set sender to sre@ring0.de using -f X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 From: Sebastian Reichel To: Sebastian Reichel , Linus Walleij , Shubhrajyoti Datta , Carlos Chinea Cc: Tony Lindgren , Grant Likely , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Rob Landley , =?UTF-8?q?=27Beno=C3=AEt=20Cousson=27?= , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=B9=D0=BB=D0=BE=20=D0=94=D0=B8=D0=BC=D0=B8=D1=82=D1=80=D0=BE=D0=B2?= , Joni Lapilainen , Aaro Koskinen , Sebastian Reichel Subject: [RFCv4 03/11] HSI: hsi-char: fix driver for multiport scenarios Date: Mon, 16 Dec 2013 00:27:56 +0100 Message-Id: <1387150085-23173-4-git-send-email-sre@debian.org> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1387150085-23173-1-git-send-email-sre@debian.org> References: <1387150085-23173-1-git-send-email-sre@debian.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix return code check of alloc_chrdev_region, which returns 0 on success. Signed-off-by: Sebastian Reichel --- drivers/hsi/clients/hsi_char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index 7f64bed..f51cf45 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c @@ -706,7 +706,7 @@ static int hsc_probe(struct device *dev) if (!hsc_major) { ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor, HSC_DEVS, devname); - if (ret > 0) + if (ret == 0) hsc_major = MAJOR(hsc_dev); } else { hsc_dev = MKDEV(hsc_major, hsc_baseminor);