Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1230140pxv; Fri, 23 Jul 2021 03:20:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySKF+bWGyqQwTTBIxzhn1dkFqlMN3WbnBkWvsYCcqqmmBniv16e6TJbRLvwG+mkAnVswKa X-Received: by 2002:a05:6402:40cf:: with SMTP id z15mr4927056edb.175.1627035630872; Fri, 23 Jul 2021 03:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627035630; cv=none; d=google.com; s=arc-20160816; b=D7KkA1dBGRVjmrMuPy+A/96TfjxmLkL645GoMl4bM6Zu9Q/wCnVZK3N50pro2oW5Rr dz6MY6Rblj+WYFp4EE70eJsnvV/tJFQzi/nVLw4SlKOosII6m7CuKC8pjqoM70vVZy20 psSiQbo9VfF6KSds7x4hWW7zQ2u9Hr7jofDiewtni1J1y1XPie3jJ+0h5kzWkRFrUhKV JpfTPK9xPHNREczYuS3fqTOTbRJmXiB+RGWaknCzmyucIvwrXzuAckp9BfcvaDGdb+5H +6ZoKZzBRpzhGXIHniwzwhk2VcxvHJlD16PWtnKa0JrFryoPNbTIcmrNnWniSnoQGh9V HHmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FBPRKY3kAU7k5qQgFJyXkiaf1woJOD/WKKAjcqGHd5U=; b=sHfCm0PobyBixO0CHiFrQ4/sJGCGrxkWIY4JUZuP4HfITtChDk/2h10MyeNB406jiI kaUbgr+kuv6qG3HKMTHhJITB6t5v+ga+qMU2+1JU+WvTFRHrPEdS0ajC1KYSnSOLjJ+p Jtz6B5uQyNZ9c69gR60p7QuN/iGHqQanQ/hSb0VEXhMCXPmKgLbanxMI592uwgK4NdhS hWRW4eZBMQFHbphYLl90s0A7ufXIH1gtcaivbdKn6MwII/pFzR5fZh3hpjxZqufe3CwV zhGWrq28BLOennWIbY+2FIa23DLqFDHg8P0dkaHozajB5MhXoZGMl29mkwXOEWqpxM6M 2PUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hkYhqb+j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si33175318edx.481.2021.07.23.03.20.06; Fri, 23 Jul 2021 03:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hkYhqb+j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231660AbhGWJhr (ORCPT + 99 others); Fri, 23 Jul 2021 05:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbhGWJhq (ORCPT ); Fri, 23 Jul 2021 05:37:46 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B664BC061575; Fri, 23 Jul 2021 03:18:18 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id z26so1161169edr.0; Fri, 23 Jul 2021 03:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FBPRKY3kAU7k5qQgFJyXkiaf1woJOD/WKKAjcqGHd5U=; b=hkYhqb+jNLAqV05N76rJ81VuMYz8g6RicGw00y/l3CFcIHdn7GaLggMFnHYy70sZYJ mTeZZ1a1OKe5GW27ABJqWKTACATxk+3V8P9iAvSzg9xzq/gBGNRKcwNqpTj2s6H/Ydgj 1OUxVyw/RkETRVb8coSDiE+5+XAI0jfpXpZ2yDTfHbLDqdlhW8v/xFD/SXy+N+pWLo8c FaNFz4yBP2VA8LwWSZciw/W8B68pJn/ZSVph6OwF3So7crEVZXeatwvUszBzXqnllAaF TYgMrz/PxzIt0uVjJjALEiSTnm094dd1RtbaCPinu9Wr8EW9YqeOJJ88yvqVep5mv3Yc iixg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FBPRKY3kAU7k5qQgFJyXkiaf1woJOD/WKKAjcqGHd5U=; b=sHFtoWQAvJx4Eqh0VhUKLjYl3pzzsGJjEY2v22r8DBuL3Bn1gOzv0kCYz7m8/gwsmH kYmK7xAdkF39pYwLenKejER9pUBJsjG2Go8hs40YSnIT1t5vSxgrmRz9lLsug2iz9UHj 8nK/0CD/9gzvACt9jHQ95kG75EDO+hOGeOrCvt1B+G4340raAaNNWnVGLCh7/jSznAEL YlMhP2voWY8iKC/Ou/TyH1bQJHXkfKiNQ9GCo6ci2619dz+kX1//zaP2hnJDByKkSIyy FRhtTQdsOxZ9mD11n4nv0NALeF7/PdnsmSwh5lBk0MKfUT1lLO6Oj8GboBgf2Cryk+UJ 0/4g== X-Gm-Message-State: AOAM533u4qDEVZ9GutJFH0wG9jS4l1K22lWaOjMl023RdUdmZpvvDAFv 0+CiLHwvLaYpwJKX+zg3kZZa4r6990otI02Y15Q= X-Received: by 2002:aa7:c1ca:: with SMTP id d10mr4479428edp.107.1627035497315; Fri, 23 Jul 2021 03:18:17 -0700 (PDT) MIME-Version: 1.0 References: <20210723074317.32690-1-jslaby@suse.cz> <20210723074317.32690-2-jslaby@suse.cz> In-Reply-To: <20210723074317.32690-2-jslaby@suse.cz> From: Max Filippov Date: Fri, 23 Jul 2021 03:18:05 -0700 Message-ID: Subject: Re: [PATCH 1/8] xtensa: ISS: don't panic in rs_init To: Jiri Slaby Cc: Greg Kroah-Hartman , linux-serial@vger.kernel.org, LKML , Chris Zankel , "open list:TENSILICA XTENSA PORT (xtensa)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 23, 2021 at 12:43 AM Jiri Slaby wrote: > > While alloc_tty_driver failure in rs_init would mean we have much bigger > problem, there is no reason to panic when tty_register_driver fails > there. It can fail for various reasons. > > So handle the failure gracefully. Actually handle them both while at it. > This will make at least the console functional as it was enabled earlier > by console_initcall in iss_console_init. Instead of shooting down the > whole system. > > We move tty_port_init() after alloc_tty_driver(), so that we don't need > to destroy the port in case the latter function fails. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xtensa@linux-xtensa.org > --- > arch/xtensa/platforms/iss/console.c | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) Acked-by: Max Filippov -- Thanks. -- Max