mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
bcache: check for allocation failures
There is a missing NULL check after the kzalloc(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This commit is contained in:
parent
6aa8f1a6ca
commit
d2a65ce2ac
@ -232,6 +232,8 @@ STORE(__cached_dev)
|
||||
bch_uuid_write(dc->disk.c);
|
||||
}
|
||||
env = kzalloc(sizeof(struct kobj_uevent_env), GFP_KERNEL);
|
||||
if (!env)
|
||||
return -ENOMEM;
|
||||
add_uevent_var(env, "DRIVER=bcache");
|
||||
add_uevent_var(env, "CACHED_UUID=%pU", dc->sb.uuid),
|
||||
add_uevent_var(env, "CACHED_LABEL=%s", buf);
|
||||
|
Loading…
Reference in New Issue
Block a user