mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
Merge 4.9.110 into android-4.9
Changes in 4.9.110 objtool: update .gitignore file xfrm6: avoid potential infinite loop in _decode_session6() netfilter: ebtables: handle string from userspace with care ipvs: fix buffer overflow with sync daemon and service iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs atm: zatm: fix memcmp casting net: qmi_wwan: Add Netgear Aircard 779S platform/x86: asus-wmi: Fix NULL pointer dereference net/sonic: Use dma_mapping_error() net: dsa: b53: Add BCM5389 support Revert "Btrfs: fix scrub to repair raid6 corruption" tcp: do not overshoot window_clamp in tcp_rcv_space_adjust() Btrfs: make raid6 rebuild retry more usb: musb: fix remote wakeup racing with suspend bonding: re-evaluate force_primary when the primary slave name changes ipv6: allow PMTU exceptions to local routes net/sched: act_simple: fix parsing of TCA_DEF_DATA tcp: verify the checksum of the first data segment in a new connection ALSA: hda/realtek - New codec support for ALC257 ext4: fix hole length detection in ext4_ind_map_blocks() ext4: update mtime in ext4_punch_hole even if no blocks are released ext4: fix fencepost error in check for inode count overflow during resize driver core: Don't ignore class_dir_create_and_add() failure. Btrfs: fix clone vs chattr NODATASUM race Btrfs: fix memory and mount leak in btrfs_ioctl_rm_dev_v2() btrfs: scrub: Don't use inode pages for device replace ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream() ALSA: hda: add dock and led support for HP EliteBook 830 G5 ALSA: hda: add dock and led support for HP ProBook 640 G4 smb3: on reconnect set PreviousSessionId field cpufreq: Fix new policy initialization during limits updates via sysfs libata: zpodd: make arrays cdb static, reduces object code size libata: zpodd: small read overflow in eject_tray() libata: Drop SanDisk SD7UB3Q*G1001 NOLPM quirk w1: mxc_w1: Enable clock before calling clk_get_rate() on it orangefs: set i_size on new symlink HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation vhost: fix info leak due to uninitialized memory fs/binfmt_misc.c: do not allow offset overflow Linux 4.9.110 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -759,7 +759,7 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj)
|
||||
|
||||
dir = kzalloc(sizeof(*dir), GFP_KERNEL);
|
||||
if (!dir)
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
dir->class = class;
|
||||
kobject_init(&dir->kobj, &class_dir_ktype);
|
||||
@@ -769,7 +769,7 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj)
|
||||
retval = kobject_add(&dir->kobj, parent_kobj, "%s", class->name);
|
||||
if (retval < 0) {
|
||||
kobject_put(&dir->kobj);
|
||||
return NULL;
|
||||
return ERR_PTR(retval);
|
||||
}
|
||||
return &dir->kobj;
|
||||
}
|
||||
@@ -1076,6 +1076,10 @@ int device_add(struct device *dev)
|
||||
|
||||
parent = get_device(dev->parent);
|
||||
kobj = get_device_parent(dev, parent);
|
||||
if (IS_ERR(kobj)) {
|
||||
error = PTR_ERR(kobj);
|
||||
goto parent_error;
|
||||
}
|
||||
if (kobj)
|
||||
dev->kobj.parent = kobj;
|
||||
|
||||
@@ -1174,6 +1178,7 @@ done:
|
||||
kobject_del(&dev->kobj);
|
||||
Error:
|
||||
cleanup_glue_dir(dev, glue_dir);
|
||||
parent_error:
|
||||
put_device(parent);
|
||||
name_error:
|
||||
kfree(dev->p);
|
||||
@@ -1991,6 +1996,11 @@ int device_move(struct device *dev, struct device *new_parent,
|
||||
device_pm_lock();
|
||||
new_parent = get_device(new_parent);
|
||||
new_parent_kobj = get_device_parent(dev, new_parent);
|
||||
if (IS_ERR(new_parent_kobj)) {
|
||||
error = PTR_ERR(new_parent_kobj);
|
||||
put_device(new_parent);
|
||||
goto out;
|
||||
}
|
||||
|
||||
pr_debug("device: '%s': %s: moving to '%s'\n", dev_name(dev),
|
||||
__func__, new_parent ? dev_name(new_parent) : "<NULL>");
|
||||
|
||||
Reference in New Issue
Block a user