From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbdHOPDo (ORCPT ); Tue, 15 Aug 2017 11:03:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:38275 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752612AbdHOPDP (ORCPT ); Tue, 15 Aug 2017 11:03:15 -0400 Date: Tue, 15 Aug 2017 17:03:13 +0200 From: Petr Mladek To: Nikitas Angelinas Cc: Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk: Clean up do_syslog() error handling Message-ID: <20170815150313.GC2738@pathway.suse.cz> 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.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 2017-07-29 20:36: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 The code looks better. Also the patch looks correct. Acked-by: Petr Mladek I have pushed it into for-4.14 branch. Best Regards, Petr