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

Skip to content
Commit c77e53c4 authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

usb: gadget: u_ether: Check if cable is connected before get and set MRU



In rmnet_extended_ioctl() for RMNET_IOCTL_SET_MRU and
RMNET_IOCTL_GET_MRU ioctls, check if the cable is connected or not
before setting and getting MRU values respectively. If cable is not
connected, then gether port will not exist and it will lead to NULL
pointer exception when trying to access it's members.
So, check if the gether port exists and only then access it's
members else return ENODEV.

CRs-fixed: 720409
Change-Id: I9e0f5c9a07a1c55f5c1e9c3b3b29982569124a11
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 1450dc76
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