mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 10:42:21 +03:00
nvethernet: remove ifr_data NULL pointer check
ifr_data pointer value used to carry mii_ioctl_data from user space to kernel space. When all values are zero it reflects the pointer value as zero and ifr_data NULL pointer check will result in failure. Driver should not check since ifr_data pointer value itself represent mii_ioctl_data. So removing the NULL check for ifr_data. Bug 200733774 Change-Id: Ibf405fe22c3e2e694e08eac598e9431066703c3c Signed-off-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2564428 Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
41429e6df9
commit
451275bea6
@@ -3415,12 +3415,6 @@ static int ether_handle_priv_rmdio_ioctl(struct ether_priv_data *pdata,
|
||||
unsigned int prtad, devad;
|
||||
int ret = 0;
|
||||
|
||||
if (!ifr->ifr_data) {
|
||||
dev_err(pdata->dev, "%s: Invalid data for priv ioctl\n",
|
||||
__func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (mdio_phy_id_is_c45(mii_data->phy_id)) {
|
||||
prtad = mdio_phy_id_prtad(mii_data->phy_id);
|
||||
devad = mdio_phy_id_devad(mii_data->phy_id);
|
||||
@@ -3467,12 +3461,6 @@ static int ether_handle_priv_wmdio_ioctl(struct ether_priv_data *pdata,
|
||||
struct mii_ioctl_data *mii_data = if_mii(ifr);
|
||||
unsigned int prtad, devad;
|
||||
|
||||
if (!ifr->ifr_data) {
|
||||
dev_err(pdata->dev, "%s: Invalid data for priv ioctl\n",
|
||||
__func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (mdio_phy_id_is_c45(mii_data->phy_id)) {
|
||||
prtad = mdio_phy_id_prtad(mii_data->phy_id);
|
||||
devad = mdio_phy_id_devad(mii_data->phy_id);
|
||||
|
||||
Reference in New Issue
Block a user