mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00: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