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

Commit 3303e636 authored by Hemant Kumar's avatar Hemant Kumar Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: Dereference i_bdev of inode only for block device



If a storage device is not a block device fsg_lun_open() and
fsg_lun_close() still dereference i_bdev pointer from inode.
This results into NULL pointer dereference. Hence fix this by
moving i_bdev dereference under NULL check in fsg_lun_open()
and add NULL check for i_bdev in fsg_lun_close().

CRs-Fixed: 782787
Change-Id: Ia045d80464fce9e16effacbff5f35d5d8627b06f
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent cd2c69a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment