From patchwork Sat May 29 06:17:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Baokun Li X-Patchwork-Id: 1485337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FsWM338F6z9sSn for ; Sat, 29 May 2021 16:08:15 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbhE2GJt (ORCPT ); Sat, 29 May 2021 02:09:49 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:2344 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhE2GJs (ORCPT ); Sat, 29 May 2021 02:09:48 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4FsWFZ33pqz1BFgV; Sat, 29 May 2021 14:03:30 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Sat, 29 May 2021 14:08:04 +0800 Received: from huawei.com (10.175.127.227) by dggpeml500020.china.huawei.com (7.185.36.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Sat, 29 May 2021 14:08:03 +0800 From: Baokun Li To: , , CC: , , , , Subject: [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used Date: Sat, 29 May 2021 14:17:29 +0800 Message-ID: <20210529061729.2824082-1-libaokun1@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500020.china.huawei.com (7.185.36.88) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/ide/ide-cd_ioctl.c: In function 'ide_cdrom_select_speed': drivers/ide/ide-cd_ioctl.c:212:6: warning: variable ‘stat’ set but not used [-Wunused-but-set-variable] It never used since introduction. Signed-off-by: Baokun Li --- drivers/ide/ide-cd_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c index 011eab9c69b7..8d0a52123349 100644 --- a/drivers/ide/ide-cd_ioctl.c +++ b/drivers/ide/ide-cd_ioctl.c @@ -231,6 +231,8 @@ int ide_cdrom_select_speed(struct cdrom_device_info *cdi, int speed) } stat = ide_cd_queue_pc(drive, cmd, 0, NULL, NULL, NULL, 0, 0); + if (stat) + return stat; if (!ide_cdrom_get_capabilities(drive, buf)) { ide_cdrom_update_speed(drive, buf);