From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EFA5C433DB for ; Mon, 8 Feb 2021 16:44:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 116AD64E8F for ; Mon, 8 Feb 2021 16:44:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234493AbhBHQoi (ORCPT ); Mon, 8 Feb 2021 11:44:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:54624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234445AbhBHQn7 (ORCPT ); Mon, 8 Feb 2021 11:43:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C50B64E8C; Mon, 8 Feb 2021 16:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612802584; bh=eLCiW8dr74SmNMqhQLmPCWGg86Kkdeyl24xAHJmSH6s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wzHDqEWWD5aeqJIHzBUqPJobuUFlZ/qd7a2zq7ySL5xX5SA6E9sAUvOFHW0m+hWtq ezGE+Tg9p8elZwfmUJqMB7hz6kMxdHD4LZ9r8NGWTIimj2XxYldSbuAEvr9QOkR1Sn HJoHIx6J5Qe3OmEniITDvAeJubnq39NXrJPeQCbk= Date: Mon, 8 Feb 2021 17:43:01 +0100 From: Greg Kroah-Hartman To: Johan Hovold Cc: linux-usb@vger.kernel.org, Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: serial: drop bogus to_usb_serial_port() checks Message-ID: References: <20210208154806.20853-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208154806.20853-1-johan@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Feb 08, 2021 at 04:48:06PM +0100, Johan Hovold wrote: > The to_usb_serial_port() macro is implemented using container_of() so > there's no need to check for NULL. > > Note that neither bus match() or probe() is ever called with a NULL > struct device pointer so the checks weren't just misplaced. > > Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman