From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934400AbdKPLik (ORCPT ); Thu, 16 Nov 2017 06:38:40 -0500 Received: from mail-ot0-f194.google.com ([74.125.82.194]:56757 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759344AbdKPLiV (ORCPT ); Thu, 16 Nov 2017 06:38:21 -0500 X-Google-Smtp-Source: AGs4zMaW7GTQLJnDW861V0EtzuYXjWVEjYrYtO7nazlXGrhB7q+KSSM5QfuRehebYzppupKZkDxihGF3K0YO5/ODE+Y= MIME-Version: 1.0 In-Reply-To: <1510829480-24760-1-git-send-email-geert@linux-m68k.org> References: <1510829480-24760-1-git-send-email-geert@linux-m68k.org> From: Arnd Bergmann Date: Thu, 16 Nov 2017 12:38:20 +0100 X-Google-Sender-Auth: dVMYSviJJr3mcmrPaRAVBmIj884 Message-ID: Subject: Re: [PATCH] media: dvb_frontend: Fix uninitialized error in dvb_frontend_handle_ioctl() To: Geert Uytterhoeven Cc: Mauro Carvalho Chehab , Shuah Khan , Linux Media Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vAGBciwu015574 On Thu, Nov 16, 2017 at 11:51 AM, Geert Uytterhoeven wrote: > With gcc-4.1.2: > > drivers/media/dvb-core/dvb_frontend.c: In function ‘dvb_frontend_handle_ioctl’: > drivers/media/dvb-core/dvb_frontend.c:2110: warning: ‘err’ may be used uninitialized in this function > > Indeed, there are 13 cases where err is used initialized if one of the > dvb_frontend_ops is not implemented. > > Preinitialize err to -EOPNOTSUPP like before to fix this. > > Fixes: d73dcf0cdb95a47f ("media: dvb_frontend: cleanup ioctl handling logic") > Signed-off-by: Geert Uytterhoeven Good catch! This one shows up on x86 allmdoconfig with gcc-4.5 or older but not gcc-4.6. Acked-by: Arnd Bergmann