mirror of https://github.com/torvalds/linux.git
Both debugfs_create_dir() and debugfs_create_file() return ERR_PTR
and never return NULL.
As Hans suggested, this patch removes the error checking for both
debugfs_create_dir() and debugfs_create_file() in smsdvb_debugfs_create().
This is because the DebugFS kernel API is developed in a way that the
caller can safely ignore the errors that occur during the creation of
DebugFS nodes. The debugfs APIs have a IS_ERR() judge in start_creating()
which can handle it gracefully. So these checks are unnecessary.
And as Hans pointed out, it's much better to first allocate debug_data
before calling debugfs_create_dir, which need not to clean anything up in
that case.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| sms-cards.c | ||
| sms-cards.h | ||
| smscoreapi.c | ||
| smscoreapi.h | ||
| smsdvb-debugfs.c | ||
| smsdvb-main.c | ||
| smsdvb.h | ||
| smsendian.c | ||
| smsendian.h | ||
| smsir.c | ||
| smsir.h | ||