Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbaGGUAM (ORCPT ); Mon, 7 Jul 2014 16:00:12 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:55263 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbaGGUAG (ORCPT ); Mon, 7 Jul 2014 16:00:06 -0400 MIME-Version: 1.0 In-Reply-To: <20140707104635.GA6407@lee--X1> References: <1404670906-17335-1-git-send-email-rickard_strandqvist@spectrumdigital.se> <20140707104635.GA6407@lee--X1> Date: Mon, 7 Jul 2014 22:00:05 +0200 Message-ID: Subject: Re: [PATCH] video: backlight: jornada720_lcd.c: Cleaning up variable that is never used From: Rickard Strandqvist To: Lee Jones Cc: Jingoo Han , Bryan Wu , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Linux Fbdev development list , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2014-07-07 12:46 GMT+02:00 Lee Jones : >> Variable ar assigned a value that is never used. >> I have also removed all the code that thereby serves no purpose. >> >> This was found using a static code analysis program called cppcheck >> >> Signed-off-by: Rickard Strandqvist >> --- >> drivers/video/backlight/jornada720_lcd.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) > > Solve it the other way around. > > Add a check and return the value if an error is returned. Hi Ok, I take the opportunity to make a bigger change to clarify the similarities in function. Hope you like it, otherwise I can make the minor change instead. Kind regards Rickard Strandqvist -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/