mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 04:04:26 +08:00
ipe/stable-6.13 PR 20241119
-----BEGIN PGP SIGNATURE----- iIcEABYIAC8WIQQzmBmZPBN6m/hUJmnyomI6a/yO7QUCZz0KKhEcd3VmYW5Aa2Vy bmVsLm9yZwAKCRDyomI6a/yO7RD5AQDY0KVqHmtmLRaIAXTUX/YSZYfw6pFVIFzv b3YkugWwAAEA/iBdSQCFBK9GnFAhVmKL99T5opHu075vfj2CGdA2Yg0= =EFOk -----END PGP SIGNATURE----- Merge tag 'ipe-pr-20241119' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe Pull IPE update from Fan Wu: "One commit from Colin Ian King, which removes unnecessary error handling code in the IPE boot policy generation helper program" * tag 'ipe-pr-20241119' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe: scripts: ipe: polgen: remove redundant close and error exit path
This commit is contained in:
commit
7e7f65647e
@ -61,15 +61,12 @@ out:
|
||||
|
||||
static int write_boot_policy(const char *pathname, const char *buf, size_t size)
|
||||
{
|
||||
int rc = 0;
|
||||
FILE *fd;
|
||||
size_t i;
|
||||
|
||||
fd = fopen(pathname, "w");
|
||||
if (!fd) {
|
||||
rc = errno;
|
||||
goto err;
|
||||
}
|
||||
if (!fd)
|
||||
return errno;
|
||||
|
||||
fprintf(fd, "/* This file is automatically generated.");
|
||||
fprintf(fd, " Do not edit. */\n");
|
||||
@ -113,11 +110,6 @@ static int write_boot_policy(const char *pathname, const char *buf, size_t size)
|
||||
fclose(fd);
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
if (fd)
|
||||
fclose(fd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int main(int argc, const char *const argv[])
|
||||
|
Loading…
Reference in New Issue
Block a user