ERR_PTR and PTR_ERR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All

I know sometime we need ERR_PTR and PTR_ERR, but why we need to write
code like this line 356 in quotactl_block()

353         bdev = lookup_bdev(tmp);
354         putname(tmp);
355         if (IS_ERR(bdev))
356                 return ERR_PTR(PTR_ERR(bdev))

instead of 

	return bdev

it convert a PTR to ERR and then back to PTR. any idea why?

thanks!

Ming



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux