[PATCH 07/10] staging: mt7621-mmc: Remove error message in debug
NeilBrown
neil at brown.name
Fri Apr 6 21:32:41 UTC 2018
On Fri, Apr 06 2018, Christian Lütke-Stetzkamp wrote:
> On Fri, Apr 06, 2018 at 11:51:24AM +0300, Dan Carpenter wrote:
>> On Fri, Apr 06, 2018 at 10:36:57AM +0200, Christian Lütke-Stetzkamp wrote:
>> > If the debug file in proc fs is not successfully created current code
>> > prints an error message, this is removed.
>> >
>> > Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
>> > Signed-off-by: Christian Lütke-Stetzkamp <christian at lkamp.de>
>> > ---
>> > drivers/staging/mt7621-mmc/dbg.c | 4 ----
>> > 1 file changed, 4 deletions(-)
>> >
>> > diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
>> > index abf92a84a417..9ad330729300 100644
>> > --- a/drivers/staging/mt7621-mmc/dbg.c
>> > +++ b/drivers/staging/mt7621-mmc/dbg.c
>> > @@ -340,10 +340,6 @@ static const struct file_operations msdc_debug_fops = {
>> > int msdc_debug_proc_init(void)
>> > {
>> > struct proc_dir_entry *de = proc_create("msdc_debug", 0667, NULL, &msdc_debug_fops);
>> > -
>> > - if (!de || IS_ERR(de))
>> > - printk("!! Create MSDC debug PROC fail !!\n");
>> > -
>>
>> The warning is that the IS_ERR() can be removed... You can remove the
>> NULL check too though, I don't care. But then, please remove the whole
>> "struct proc_dir_entry *de = " assignment as well?
>
> Thank, I overlooked it, will remove the assignment and resend a v2
> tomorrow.
While you are at it, maybe change msdc_debug_proc_init() to return
'void' as the return value is never used.
Patches look good to me, and my gnubee still boots and works, so
Reviewed-by: NeilBrown <neil at brown.name>
for the series.
Thanks,
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20180407/7d90e9bb/attachment.asc>
More information about the devel
mailing list