From patchwork Sun Sep 29 22:40:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?T2thbiBUw7xtw7xrbMO8?= X-Patchwork-Id: 831387 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CEF7137932; Sun, 29 Sep 2024 22:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727649630; cv=none; b=SOrmGaXWD2CcQzLF3OwgKgkb+ZdbxwU0KBM/iD4vjghQO3rtyrj5wunfcKRdLyAj+c7/uav5mx56phn5SUYk+2DCpGvncQtbrCNBk9TSu7bIwmCz1nH5GigaootTkitMmqhs4ppK4ONtxtTe0nAS7nULBnNMlAI2pe63j4M50c4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727649630; c=relaxed/simple; bh=uQ0jDg45k/9ZYKbtaF8iIOXClqemchzGQ1OtKYSbqhE=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=YBnFrSP1k03BeNrBSquLCWC4drgW7ta5dTtrsqK8IQ4fqz4PQv0rEfkLwOmrMUCK3F/6tiqa4OefxwYry3x68cyDkv0t9pZtdTOTY8sDNjiCgFK9xsNYpuUcz/txZqaHgNUSWhSdjlZ4oGAIVCUwGziNitpyEmOd+V+bDbLNoqI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TEtyKUyh; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TEtyKUyh" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-20b1b146432so6156955ad.0; Sun, 29 Sep 2024 15:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727649626; x=1728254426; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=uQ0jDg45k/9ZYKbtaF8iIOXClqemchzGQ1OtKYSbqhE=; b=TEtyKUyhIXN3G0Z/J0IOF+0Klo1zBOWFnPG6ef2j+3c+BBI6Ca4yg2rXy8iKRebnNQ 31rqw/MCecVpniXFd4Nlhwgu19f2PNtZPcj8yI0ChjglXKYNZ9616PQ6KdlXG/IwwPmq TTol/iFMazbZKBLzb7GBOldCHcWL+nhu6sKk6R9TIswaaq59paw6wbTFAmcDs8uEyh5I sZfGKJs9iw/lkGftrIpZhCQYQKKICAadDx4eLfYqAt7jUxH5YbZOWMdE2V7jBPLsWLZj O/7GhOLKtzq5zZMOFiEQyYTCdh2cyoo0n0LCw0o2bgZ8npOOjoSnhYUpWyr0/iuGQ0hi iclQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727649626; x=1728254426; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uQ0jDg45k/9ZYKbtaF8iIOXClqemchzGQ1OtKYSbqhE=; b=mZVsRTWBpq1/tyn/C19NmM/p0+zWEYVmEAvx8FKug91g2BYtX8T+x1cohjv+VWIHKa /YpZEGaWADpQ9y7mlqISuSwjEIp56WMnOShpm1WAGnt69pc9E1ya0iNhjDkvtI5L2tL4 s/f6M866rhIaKtWqy3EahS6b6m7x9rNAGTcDHq1DeDxePZXfb/y11s/wcDRZbb7p++MM mOAl9Yz1hNBypXqnt7dVdst6GChtIUZyL4psaGCdvShW4f4GNm7gf2oE1QPpIou5IR1u Xng7Pjm0LJOwcl5XmI0EwBb1kzYbzSLmfwoMgm0lFYMHHwLAVtL+7uWrCnuBoJBa2Odz CR1Q== X-Forwarded-Encrypted: i=1; AJvYcCX2u6YUvxGyymTk2Q1EVVVJ7IbJuJbYzChfE8pBEf6YTaVEsCUyVmJc6zOBEuk4DmyDTwg2kOsTeu5ApEQ=@vger.kernel.org, AJvYcCXG+8oerTjE/9kv9GbTJuTNqktMpLqf7+HF9sBK1WkqSQw1RakNT+wrDz+mmWO0Qij2Cf3zNQiCAOSmbWJK0xHr@vger.kernel.org X-Gm-Message-State: AOJu0Yygyd+2NLKg2xHDE5qlfUPXDzrlszdbe49G+vjam3laUs4lJBVq VLMtKb77ocod/PnTnPABc3sKrqNPzbzCdYXCix9FKnOdrBMKPhZ1vTXjDiGp3ogxmirxkS9oGRc j/j4i6lYGdwZKPGIrqX9X6tUYx5U= X-Google-Smtp-Source: AGHT+IGfomPUfnJcfCZPAC+RPPYG7PTZ5yiXTQWBLdubeReQL+hrwgS3eB0ZsdcANYFZ0jDlMQ922Lq0PE3h1ow3WJs= X-Received: by 2002:a05:6a21:7884:b0:1cf:31da:c435 with SMTP id adf61e73a8af0-1d509b25689mr4352318637.5.1727649626337; Sun, 29 Sep 2024 15:40:26 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: =?utf-8?b?T2thbiBUw7xtw7xrbMO8?= Date: Mon, 30 Sep 2024 01:40:14 +0300 Message-ID: Subject: update core.c To: shuah@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , Shuah Khan , Kees Cook 1:The control flow was simplified by using else if statements instead of goto structure. 2:Error conditions are handled more clearly. 3:The device_unlock call at the end of the function is guaranteed in all cases. Github request : https://github.com/torvalds/linux/pull/967 --- core.c 2024-09-30 01:32:34.037110064 +0300 +++ new_core.c 2024-09-30 01:36:08.278540961 +0300 @@ -55,6 +55,7 @@ return rc; } + /** * nfc_fw_download_done - inform that a firmware download was completed *