Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751776AbdHAHiE (ORCPT ); Tue, 1 Aug 2017 03:38:04 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:38566 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722AbdHAHiB (ORCPT ); Tue, 1 Aug 2017 03:38:01 -0400 Date: Tue, 1 Aug 2017 16:38:13 +0900 From: Sergey Senozhatsky To: Nikitas Angelinas Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk: Clean up do_syslog() error handling Message-ID: <20170801073813.GB513@jagdpanzerIV.localdomain> References: <20170730033636.GA935@vostro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170730033636.GA935@vostro> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 673 Lines: 21 On (07/29/17 20:36), Nikitas Angelinas wrote: > The error variable in do_syslog() is preemptively set to the error code > before the error condition is checked, and then set to 0 if the error > condition is not encountered. This is not necessary, as it is likely > simpler to return immediately upon encountering the error condition. A > redundant set of the error variable to 0 is also removed. > > This patch has been build-tested on x86_64, but not tested for > functionality. > > Signed-off-by: Nikitas Angelinas looks good to me, Reviewed-by: Sergey Senozhatsky // p.s. Petr is on vacation now -ss