Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe700771 authored by Fengguang Wu's avatar Fengguang Wu Committed by Marcel Holtmann
Browse files

Bluetooth: fix err_cast.cocci warnings



net/bluetooth/smp.c:2650:9-16: WARNING: ERR_CAST can be used with tfm_aes

Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Generated by: scripts/coccinelle/api/err_cast.cocci

Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 9437d2ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2931,7 +2931,7 @@ static struct l2cap_chan *smp_add_cid(struct hci_dev *hdev, u16 cid)
	tfm_aes = crypto_alloc_blkcipher("ecb(aes)", 0, 0);
	tfm_aes = crypto_alloc_blkcipher("ecb(aes)", 0, 0);
	if (IS_ERR(tfm_aes)) {
	if (IS_ERR(tfm_aes)) {
		BT_ERR("Unable to create crypto context");
		BT_ERR("Unable to create crypto context");
		return ERR_PTR(PTR_ERR(tfm_aes));
		return ERR_CAST(tfm_aes);
	}
	}


create_chan:
create_chan: